title: Removing all event handlers in one go
body: <p>Problem: I have a document class which contains a list of objects. These objects raise events such as <code>SolutionExpired</code>, <code>DisplayExpired</code> etc. The document needs to respond to this.</p>
  
  <p>Documents can sometimes exchange objects, but a single object should never be 'part' of more than one document.</p>
  
  <p>My document class contains a bunch of methods which serve as event handlers. Whenever an object enters the document, I use <code>AddHandler</code> to set up the events, and whenever an object is removed from the document I use <code>RemoveHandler</code> to undo the damage. However, there are cases where it's difficult to make sure all the steps are properly taken and I might thus end up with rogue event handlers.</p>
  
  <p>Long story short; how do I remove all the handlers that are pointing to a specific method? Note, I don't have a list of potential event sources, these could be stored anywhere.</p>
  
  <p>Something like:</p>
  
  <pre><code>RemoveHandler *.SolutionExpired, AddressOf DefObj_SolutionExpired
  </code></pre>