2008-04-24 Mike Kestner <mkestner@novell.com>

* gdk/Window.custom (Destroy): take a normal ref for the native
	method to release, and Dispose our toggle ref.  Fixes #382186.

svn path=/trunk/gtk-sharp/; revision=101734
This commit is contained in:
Mike Kestner 2008-04-24 20:01:31 +00:00
parent a0d608fcd2
commit e7489cc003
2 changed files with 16 additions and 3 deletions

View file

@ -1,3 +1,8 @@
2008-04-24 Mike Kestner <mkestner@novell.com>
* gdk/Window.custom (Destroy): take a normal ref for the native
method to release, and Dispose our toggle ref. Fixes #382186.
2008-04-24 Andres G. Aragoneses <aaragoneses@novell.com>
* glib/Signal.cs: Remove unneeded cast.

View file

@ -4,7 +4,7 @@
// Mike Kestner <mkestner@ximian.com>
//
// Copyright (c) 2003 Moritz Balz
// Copyright (c) 2004 Novell, Inc.
// Copyright (c) 2004 - 2008 Novell, Inc.
//
// This code is inserted after the automatically generated code.
//
@ -68,12 +68,20 @@
}
}
[DllImport("libgobject-2.0-0.dll")]
static extern IntPtr g_object_ref (IntPtr raw);
[DllImport("libgdk-win32-2.0-0.dll")]
static extern void gdk_window_destroy(IntPtr raw);
public void Destroy() {
public void Destroy ()
{
// native method assumes an outstanding normal ref, but we hold a
// toggle ref. take out a normal ref for it to release, and let
// Dispose release our toggle ref.
g_object_ref (Handle);
gdk_window_destroy(Handle);
Raw = IntPtr.Zero;
Dispose ();
}
public void MoveResize (Gdk.Rectangle rect) {