Re: Troubles with containers



On Sun, 31 May 2009, Denis Micolani <micorulez gmail com> wrote :

He is not deleting vbox and notebook in this constructor since this
would lead to my same problem.
Anyway isn't this leading to memory leaks ? Or is gtkmm deleting them
( I don't think so ) ?

If the widgets in question are part of the main application window, and that window is passed to Gtk::Main so that closing it terminates the application, then there is no memory leak. The widgets are required for the entire duration of program execution, and the OS frees the memory on application exit.

Arguably it's a little ugly to rely on that, but it's not wrong.
--
Rob Pearce                       http://www.bdt-home.demon.co.uk

The contents of this | Windows NT crashed.
message are purely   | I am the Blue Screen of Death.
my opinion. Don't    | No one hears your screams.
believe a word.      |


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