Re: gtk_widget_destroy not freeing memory

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 ...


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