[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gtkmm
Subject:    Re: Arbitrary number of child windows
From:       Paul Davis <paul () linuxaudiosystems ! com>
Date:       2008-05-10 21:11:40
Message-ID: 1210453900.6883.29.camel () localhost ! localdomain
[Download RAW message or body]


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.


_______________________________________________
gtkmm-list mailing list
gtkmm-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtkmm-list
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic