Hard to know without knowing what sort of application you're working with.
If it's a Windows Forms application, you can write an event handler for the
System.Windows.Forms.Application.ThreadExit or
System.Windows.Forms.Application.ApplicationExit events.
--
HTH,
Kevin Spencer
Chicken Salad Surgeon
Microsoft MVP
"Mike" <MLM450@xxxxxx> wrote in message
news:b05e9485-9320-4f03-912c-ba1ee4b3d840@xxxxxx
Quote:
>I am using a static event from the .NET framework and MSDN says:
>
> "Because this is a static event, you must detach your event handlers
> when your application is disposed, or memory leaks will result."
>
> But I am using the event in a static class in a DLL so I can not
> implement the disposable interface. Where should I detach the event?
>
> Thanks,
> Mike