Please do not reply to this email- if you want to comment on the bug, go to the URL shown below and enter your comments there.
Changed by [EMAIL PROTECTED] http://bugzilla.ximian.com/show_bug.cgi?id=78285 --- shadow/78285 2006-05-04 11:57:59.000000000 -0400 +++ shadow/78285.tmp.20987 2006-05-04 12:21:47.000000000 -0400 @@ -32,6 +32,15 @@ temporary retention) As for keeping a cached bitmap it could be done in Icon.ToBitmap. However we still must return a clone of that bitmap when asked (and not just a reference) as we don't know if the caller will call Dispose on it. Not sure if it's worth the extra code ?!? + +------- Additional Comments From [EMAIL PROTECTED] 2006-05-04 12:21 ------- +Can't we keep a reference in Icon even if someone disposes the bitmap +? A little test like "if (icon_bitmap != null) return icon_bitmap;" in +ToBitmap () should be enough. If the bitmap is null we create it again. + +With that method we do not need to create a new bitmap all the time +for Graphics.DrawIcon which saves some time when it get's called from +System.Windows.Forms (ThemeWin32Classic DrawStatusBarPanel for example). _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
