Re: best way to use multiple windows
- From: John Taber <jtaber johntaber net>
- To: gtkmm-list gnome org
- Subject: Re: best way to use multiple windows
- Date: Mon, 18 Jul 2005 15:41:37 -0600
Armin Burgmeier wrote:
John Taber wrote:
Well, it is heap vs stack - I am not sure which is really better for
"normal" gui applications. But I have always created my dialogs as
pointers - it just seems more traditional c++.
Isn't that dangerous if exceptions are thrown? Why not let the compiler
Yeah, I think c++ in general is pretty dangerous:) And I guess that's
why there is java and C#. I'm always open to better ideas. Whatever is
the fastest, simplest, cleanest. We've always called all our widgets
with pointers as well, since we've never really taken the time to figure
out what the memory hit is, especially if there are a few layers of
dialogs open as per the original question in the thread and not sure
what happens if one of the widgets is a 500 mb image. But your idea of
the dialog container on stack but widgets on heap would be efficient if
it doesn't cause other problems - and I guess you're saying gtkmm takes
care of that.
John
do the dirty work? Remember that just the gtkmm instances like a
Gtk::Dialog are created on the stack, but they create their underlaying
GTK+ objects on the heap. This method seems to be the C++ way for me.
But if you like using dynamically allocated memory here, go on. I just
wanted to add another alternative how to display popup dialogs :)
- Armin
_______________________________________________
gtkmm-list mailing list
gtkmm-list gnome org
http://mail.gnome.org/mailman/listinfo/gtkmm-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]