Re: Freing the memory used by widgets



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]