Re: Good style for memory management?
- From: Roland Schwarz <roland schwarz chello at>
- To: gtkmm-list gnome org
- Subject: Re: Good style for memory management?
- Date: Sun, 18 Mar 2007 17:06:13 +0100
Paul Pogonyshev wrote:
When I used gtkmm, I tended to let GTK+ manage all widgets itself, i.e.
by calling manage() on them. This way, widgets in destroyed containers
are normally destroyed as well and you don't need to keep references to
them. You only need to delete windows.
Ok, fine. But how to you handle the time between new'ing the widgets and
adding them to their container? If I understand the memory management
correctly the widgets are effectively unmanaged until they have been
added to the container. I.e. if something throws before they have been
added to the container, none will clean up (manage) them. Not?
Another option might be using Glade for UI, but I don't have any
experience with it, so I don't know how it is done in C++.
Hmm, might look into glade later. For now I am interested in shrink
wrapped C++.
Roland
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]