2002-09-04 05:25:58 +00:00
|
|
|
// Gtk.Object.custom - Gtk Window class customizations
|
|
|
|
//
|
|
|
|
// Author: Mike Kestner <mkestner@speakeasy.net>
|
|
|
|
//
|
|
|
|
// (c) 2002 Mike Kestner
|
|
|
|
//
|
|
|
|
// This code is inserted after the automatically generated code.
|
|
|
|
|
|
|
|
|
|
|
|
[DllImport("gtksharpglue")]
|
|
|
|
static extern void gtksharp_object_unref_if_floating (IntPtr raw);
|
|
|
|
|
|
|
|
protected override void DisposeNative ()
|
|
|
|
{
|
2002-09-12 05:21:16 +00:00
|
|
|
if (_needs_unref)
|
|
|
|
base.DisposeNative ();
|
|
|
|
else
|
|
|
|
gtksharp_object_unref_if_floating (Handle);
|
2002-09-04 05:25:58 +00:00
|
|
|
}
|
|
|
|
|
2002-09-12 05:21:16 +00:00
|
|
|
private bool _needs_unref = false;
|
|
|
|
|
|
|
|
public override void Ref ()
|
|
|
|
{
|
|
|
|
_needs_unref = true;
|
|
|
|
base.Ref ();
|
|
|
|
}
|
|
|
|
|