Re: gtk_widget_destroy not freeing memory
- From: jcupitt gmail com
- To: "Harinandan S" <harinandans gmail com>
- Cc: gtk-list gnome org
- Subject: Re: gtk_widget_destroy not freeing memory
- Date: Fri, 18 Apr 2008 12:17:01 +0100
2008/4/18 Harinandan S <harinandans gmail com>:
> allocated. I have a main window which creates sub windows. While returning
> back to main window from sub window, i destroy the sub window. I observed
> that memory increased gradually by 2% when a sub window is created and
> memory did not decrease after destroying it. After several opening and
> closing of windows, OS killed the process saying "out of memory".
>
> Am i not using the correct way to destroy a window and its children?
That should work. I would guess something else is not being freed.
Try running your program under valgrind. It will be able to tell you
exactly where the memory that is not being freed was allocated.
Something like:
$ export G_DEBUG=gc-friendly
$ export G_SLICE=always-malloc
$ valgrind --leak-check=yes myprogram arg1 arg2 arg3 ...
John
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]