creatring Glib::RefPtr from plain pointer



Hi, I need someone to explain this:

this is correct:
Glib::RefPtr<Gtk::Menu> pMenuPopup = Gtk::manage(new Gtk::Menu(menu));

it this correct to? if not why not?
Glib::RefPtr<Gtk::Menu> pMenuPopup = Glib::RefPtr<Gtk::Menu>(new Gtk::Menu(menu));

thanks!
~Brute




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