[Mono-bugs] [Bug 80552][Nor] Changed - [WIN] Font.ToLogFont leaks GDI objects

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Fri Jan 19 10:43:54 EST 2007


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 sebastien at ximian.com.

http://bugzilla.ximian.com/show_bug.cgi?id=80552

--- shadow/80552	2007-01-19 10:30:43.000000000 -0500
+++ shadow/80552.tmp.25490	2007-01-19 10:43:54.000000000 -0500
@@ -1,23 +1,23 @@
 Bug#: 80552
 Product: Mono: Class Libraries
 Version: 1.2
 OS: Windows XP
 OS Details: 
-Status: NEW   
+Status: ASSIGNED   
 Resolution: 
 Severity: Unknown
 Priority: Normal
 Component: Sys.Drawing.
 AssignedTo: sebastien at ximian.com                            
 ReportedBy: monkey at jpobst.com               
 QAContact: mono-bugs at ximian.com
 TargetMilestone: ---
 URL: 
 Cc: 
-Summary: [Windows] Font.ToHfont leaks GDI objects
+Summary: [WIN] Font.ToLogFont leaks GDI objects
 
 Calling Font.ToHfont seems to leak a GDI object every time it is called.
 
 Running the attached case on WinMono reports ~2030 GDI objects in use.
 Running on MS .Net reports ~30 GDI objects in use.
 
@@ -56,6 +56,16 @@
 ------- Additional Comments From sebastien at ximian.com  2007-01-19 10:30 -------
 Hmm... can't duplicate yesterday's results :-( ToHFont returns a
 different handle each time.
 
 note to self: I should have fixed it yesterday ;-)
 
+
+------- Additional Comments From sebastien at ximian.com  2007-01-19 10:43 -------
+The leak problem comes from ToLogFont(object), which is one of the
+worse API method in SD.
+
+If I cache the LOGFONT then the number of GDI objects stops at 40. I
+commited this part in r71324 (I don't trust tomorrow results ;-) and
+will look into ToLogFont (summary updated).
+
+Thanks for the sample!


More information about the mono-bugs mailing list