Memory Management


I was wondering how memory management works in gtk+.  I've seen many
examples where allocation is performed using gtk_object_new(), but never
destroyed.  Does gtk+ maintain a list of all allocated objects and
automatically destroy them when the application is destroyed?

Are there any exceptions to this (that would require the programmer to
destroy objects).  For example, I know that when using glib's string
functions, you have to deallocate the memory returned yourself.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]