* Mono.Cairo/Context.cs: Fix leak of the surface if set with
Target .
svn path=/trunk/mcs/; revision=81569
2007-07-07 Miguel de Icaza <miguel@novell.com>
- * Mono.Cairo/Context.cs: From Alp Toker: new SetSourceOveload with
- no x, y parameters.
+ * Mono.Cairo/Context.cs: Fix leak of the surface if set with
+ Target .
+
+ From Alp Toker: new SetSourceOveload with no x, y parameters.
From Alp Toker: Add new API call IdentityMatrix.
public Cairo.Surface Target {
set {
+ if (state != IntPtr.Zero)
+ NativeMethods.cairo_destroy (state);
+
state = NativeMethods.cairo_create (value.Handle);
}