mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2024-12-23 18:25:28 +00:00
2002-09-11 Miguel de Icaza <miguel@ximian.com>
* glib/Object.cs (DisposeNative): Call GC.SuppressFinalize, and set the obj to null. svn path=/trunk/gtk-sharp/; revision=7411
This commit is contained in:
parent
32ae593a0e
commit
c9434076c5
|
@ -1,3 +1,8 @@
|
|||
2002-09-11 Miguel de Icaza <miguel@ximian.com>
|
||||
|
||||
* glib/Object.cs (DisposeNative): Call GC.SuppressFinalize, and
|
||||
set the obj to null.
|
||||
|
||||
2002-09-11 Rachel Hestilow <hestilow@ximian.com>
|
||||
|
||||
* glib/Object.cs (Ref): Added.
|
||||
|
|
|
@ -55,13 +55,15 @@ namespace GLib {
|
|||
|
||||
[DllImport("gobject-2.0")]
|
||||
static extern void g_object_unref (IntPtr raw);
|
||||
|
||||
|
||||
protected virtual void DisposeNative ()
|
||||
{
|
||||
if (_obj == IntPtr.Zero)
|
||||
return;
|
||||
|
||||
GC.SuppressFinalize (this);
|
||||
g_object_unref (_obj);
|
||||
_obj = IntPtr.Zero;
|
||||
}
|
||||
|
||||
[DllImport("gobject-2.0")]
|
||||
|
|
Loading…
Reference in a new issue