View Single Post
Old 03-05-2008   #7 (permalink)
Kevin Spencer


 
 

Re: Static Events Used By Static Classes

Hi Mike,

In that case, you can implement a Dispose method and a Finalizer. The
Dispose method can do the clean-up, and if it is not used by the developer,
the Finalizer can call it conditionally. The Finalizer is always called when
the DLL is unloaded from memory. See the following MSDN article on how to
implement this pattern:

http://msdn2.microsoft.com/en-us/library/b1yfkh5e.aspx

--
HTH,

Kevin Spencer
Chicken Salad Surgeon
Microsoft MVP

"Mike" <MLM450@xxxxxx> wrote in message
news:3fe6b8fd-5b65-4bb0-8fdc-fab7b27976d5@xxxxxx
Quote:

> This is used in a DLL. That DLL might be used by a Windows Forms app
> but that is not gauranteed.

My System SpecsSystem Spec