Re: Arbitrary number of child windows



On Fri, 2008-05-09 at 19:28 +0200, Holger Berndt wrote:

> 
> Another possibility would be something along Qt's QObject::deleteLater()
> function to not actually do a "delete this;" but schedule an object for
> deletion in the event loop. That sounds more well-defined than a "delete
> this", but I haven't found an equivalent in gtkmm.
> 
> How do other people write their self-destructing child windows?

template<class T> bool idle_deleter (T* ptr) { delete ptr; return
false; }

Glib::signal_idle.connect (sigc::bind (sigc::ptr_fun
(idle_deleter<Window>), aWindow);

done.




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