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 05:26:18.000000000 -0400 +++ shadow/78285.tmp.20237 2006-05-04 11:57:59.000000000 -0400 @@ -1,14 +1,14 @@ Bug#: 78285 Product: Mono: Class Libraries Version: unspecified -OS: +OS: unknown OS Details: -Status: NEW +Status: NEEDINFO Resolution: -Severity: +Severity: Unknown Priority: Normal Component: Sys.Drawing. AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] QAContact: [EMAIL PROTECTED] TargetMilestone: --- @@ -19,6 +19,19 @@ Graphics.DrawIcon creates a bitmap for an icon with Icon.ToBitmap() but it doesn't dispose the bitmap (Icon.ToBitmap always creates a new bitmap). Though, for performance reasons, it would be better to keep a reference of the bitmap in Icon and only create a new bitmap if the bitmap is null. Icons are not that big so a few more KB shouldn't matter... + +------- Additional Comments From [EMAIL PROTECTED] 2006-05-04 11:57 ------- +I agreed the bitmaps should be disposed (and it's fixed in SVN r60264). + +But anyway the GC will (at some point) finalize the object and reclaim +the memory - so it *shouldn't* be leaking unless there a bug elsewhere +else. Do you have some data that show a leak ? (and not just a +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 ?!? _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
