Re: Freing the memory used by widgets
- From: John K Luebs <jkluebs luebsphoto com>
- To: Binoj VB <binoj vb powerquest com>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: Freing the memory used by widgets
- Date: Fri, 21 Mar 2003 18:57:10 -0500
On Fri, Mar 21, 2003 at 02:52:23PM -0700, Binoj VB wrote:
How to free the memory used by widgets??
Please help
Binoj
In most cases you shouldn't have to. When a widget is added to a
container, ownership is passed to the container. In
other words, adding to a container does not increment the reference
count because it assumes the reference that is being passed to it.
When a container is destroyed it will unref all its children. This
should take care of 90% of all cases.
This means that you only want to unref a widget to balance an explicit
ref in your code, otherwise don't touch the reference count.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]