+2004-10-27 Jordi Mas i Hernandez <jordi@ximian.com>
+
+ * gdipFunctions.cs: calls GdiplusShutdown to propery signal GDI+
+ termination
+
2004-11-03 Miguel de Icaza <miguel@ximian.com>
* TextureBrush.cs (Clone): While cloning, it is not enough to let
static internal extern void GdiplusShutdown(ref ulong token);
static ulong GdiPlusToken;
+
+ static void ProcessExit (object sender, EventArgs e)
+ {
+ GdiplusShutdown (ref GdiPlusToken);
+ }
+
static GDIPlus ()
{
GdiplusStartupInput input = GdiplusStartupInput.MakeGdiplusStartupInput();
GdiplusStartupOutput output = GdiplusStartupOutput.MakeGdiplusStartupOutput();
GdiplusStartup (ref GdiPlusToken, ref input, ref output);
+ AppDomain.CurrentDomain.ProcessExit += new EventHandler (ProcessExit);
}
// Copies a Ptr to an array of Points and releases the memory