[Mono-dev] [PATCH] MWF: Don't dispose objects that are not owned
kornelpal at hotmail.com
Sun Oct 23 10:55:55 EDT 2005
OK. I have plans on some modifications to Icon class as it lacks of
important functionalities. You are right that using ToBitmap() is much
faster currently so it's OK to retain the current solution until
Graphics.DrawIcon will work as it should.
It it OK to add HideSystray(); to NotifyIcon.Dispose?
----- Original Message -----
From: "Peter Dennis Bartok" <peter at novonyx.com>
To: "Kornél Pál" <kornelpal at hotmail.com>; <mono-devel-list at lists.ximian.com>
Sent: Sunday, October 23, 2005 4:43 PM
Subject: Re: [Mono-dev] [PATCH] MWF: Don't dispose objects that are not
> The changes to not call Dispose are ok. The NotifyIcon patch is not ok to
> check in, I want it to use ToBitmap() once instead of every refresh. It
> doesn't matter if ideologically it should use DrawIcon, fact is that we'd
> creating and throwing away bitmaps at considerable cost on every refresh
> we use it, so it needs to stay the way it is today.
> -----Original Message-----
> From: "Kornél Pál" <kornelpal at hotmail.com>
> To: <mono-devel-list at lists.ximian.com>
> Date: 23 October, 2005 05:01
> Subject: [Mono-dev] [PATCH] MWF: Don't dispose objects that are not owned
>>Objects should not dispose objects that were not created by them as they
>>be needed by other objects.
>>This patch fixes the above described problem.
>>In addition NotifyIcon assumes that Graphics.DrawIcon uses Icon.ToBitmap
>>Graphics.DrawImage that should not be assumed as DrawIcon should be
>>to have better performance so I modified the code to use
>>And added HideSystray to NotifyIcon.Dispose as at least on Windows it is
>>required. Otherwise notify icon is displayed until you move mouse over
>>when it's host process already terminated. Note that I expecienced that
>>notify icon is not removed on Windows but it seems to be a bug in
>>XplatUI.SystrayRemove rather than in NotifyIcon.
>>Please review and approve the patch.
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
More information about the Mono-devel-list