2005-08-19 Jordi Mas i Hernandez <jordi@ximian.com>
authorJordi Mas i Hernandez <jordi@mono-cvs.ximian.com>
Fri, 19 Aug 2005 16:31:16 +0000 (16:31 -0000)
committerJordi Mas i Hernandez <jordi@mono-cvs.ximian.com>
Fri, 19 Aug 2005 16:31:16 +0000 (16:31 -0000)
* gdipFunctions.cs: Before calling GdiplusShutdown we make that all of handles
from gdiplus have been released

svn path=/trunk/mcs/; revision=48562

mcs/class/System.Drawing/System.Drawing/ChangeLog
mcs/class/System.Drawing/System.Drawing/gdipFunctions.cs

index 48b07507316c3390afe3954bd990a0ac422caf24..19c19bd4be8bc1dbe99f2849250de912c3ea3d08 100644 (file)
@@ -1,3 +1,8 @@
+2005-08-19 Jordi Mas i Hernandez <jordi@ximian.com> 
+
+       * gdipFunctions.cs: Before calling GdiplusShutdown we make that all of handles
+       from gdiplus have been released
+
 2005-08-18 Vladimir Krasnov <vladimirk@mainsoft.com>
 
        * Pen.jvm.cs: Fixed DashSpacing in createStrokedShape
index 80210e3a1cc6a632756f05f7fae1e8d16bd9eba8..b892174b7438a9f39b63645aa8ead2b4b97227d8 100644 (file)
@@ -66,7 +66,11 @@ namespace System.Drawing
                static ulong GdiPlusToken;
 
                static void ProcessExit (object sender, EventArgs e)
-               {                       
+               {               
+                       // Called all pending objects and claim any pending handle before
+                       // shutting down
+                       GC.Collect ();  
+                       GC.WaitForPendingFinalizers ();
                        GdiplusShutdown (ref GdiPlusToken);
 
                        if (UseX11Drawable && Display != IntPtr.Zero) {