Since I failed to find an answer in various FAQs and groups I hope
somebody can help me out here. Also, if this is a FAQ my apologies. After
this introduction, here it goes:
I noticed that glade (http://glade.gnome.org/) when generating code in C++
creates code like the one presented below:
Gtk::Label *label = Gtk::manage(new class Gtk::Label("Hel lo"));
Gtk::manage() provides for automatic management of dynamically allocated
widgets. Now the question I have is about *new class*. In the Gtkmm
documentation I see Gtk::manage(new Gtk::Label("Hel lo")) not
Gtk::manage(new class Gtk::Label("Hel lo")). Yet my compiler (gcc 3.2.3)
gladly accept this. So what is the meaning of "new class T"? How does it
differ from "new T"? Pointers to books, technical reports and such
explaining the above are greatly appreciated!
--
delete fubar to e-mail me
somebody can help me out here. Also, if this is a FAQ my apologies. After
this introduction, here it goes:
I noticed that glade (http://glade.gnome.org/) when generating code in C++
creates code like the one presented below:
Gtk::Label *label = Gtk::manage(new class Gtk::Label("Hel lo"));
Gtk::manage() provides for automatic management of dynamically allocated
widgets. Now the question I have is about *new class*. In the Gtkmm
documentation I see Gtk::manage(new Gtk::Label("Hel lo")) not
Gtk::manage(new class Gtk::Label("Hel lo")). Yet my compiler (gcc 3.2.3)
gladly accept this. So what is the meaning of "new class T"? How does it
differ from "new T"? Pointers to books, technical reports and such
explaining the above are greatly appreciated!
--
delete fubar to e-mail me
Comment