Re: Disposing of memory.
- From: Havoc Pennington <hp redhat com>
- To: Mark Cox <mark_cox iprimus com au>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: Disposing of memory.
- Date: Mon, 17 Feb 2003 11:55:47 -0500
On Mon, Feb 17, 2003 at 06:33:21PM +1000, Mark Cox wrote:
I have created a class which is a subclass of GObject. I have
overridden gobject's dispose method with my own and then called the
gobject's dispose method....which is all working fine.
But after I create the object, then dispose of it, I still get a single
memory leak caused by the created object. When I put g_free(theObject)
at the end of the code the leak goes away.
Is this what I am suppose to do, or should the type system clean it up
for me without calling g_free.
You probably want to be using _unref() and override finalize() instead
of using dispose().
Havoc
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]