Re: Memory leak problem



On Sat, 19 Jan 2002, Jeff Franks wrote:

> Hi,
> 
> I'm having problems with a memory leak. While working with GdkPixbufs I 
> noticed when I called gtk_window_set_default_icon_list to set a default 
> window icon the internal
> default_icon_list does not release its reference at program termination 
> but it does when a new list is set. I posted a bug report in bugzilla 
> with the following reply:
> 
> We never release resources that last the life of the program (the operating system does it just fine).
> 
> This is where I'm confused. Does the operating system release a program's allocated memory when it terminates. I'm working with C++ and rely on a GTK object's final g_object_unref()call to call a destroy_notify function which deletes the GTK object's C++ wrapper. I've found that since the GdkPixbuf's are not released delete is never called. 
> 
> Is this a memory leak or does the operating system release the allocated memory even though delete is not called. 

The OS frees the memory when the process terminates, but it can't call 
delete, since it knows nothing of the structure of C++ and the program.

/ Alex





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