mirror of
https://github.com/ckaczor/wpf-notifyicon.git
synced 2026-01-30 01:35:37 -05:00
CHG NotifyIcon is not only removed on user-initiated disposal, but also garbage collection (NTFY-5).
git-svn-id: https://svn.evolvesoftware.ch/repos/evolve.net/WPF/NotifyIcon@174 9f600761-6f11-4665-b6dc-0185e9171623
This commit is contained in:
@@ -361,9 +361,10 @@ namespace Hardcodet.Wpf.TaskbarNotification.Interop
|
||||
private void Dispose(bool disposing)
|
||||
{
|
||||
//don't do anything if the component is already disposed
|
||||
if (IsDisposed || !disposing) return;
|
||||
if (IsDisposed) return;
|
||||
IsDisposed = true;
|
||||
|
||||
//always destroy the unmanaged handle (even if called from the GC)
|
||||
WinApi.DestroyWindow(MessageWindowHandle);
|
||||
messageHandler = null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user