On Mon, 2006-10-30 at 01:00 +0200, Paul Pogonyshev wrote:
> Hi,
>
> Is there a way to make a slot that calls `delete arg' on its argument
> pointer (of a known type.) It is trivial to write a one-line function
> for it, but maybe there is a standard one ready for this?
its not as trivial as you might think, because the lifetime of the
object during event processing can be important. generally, i like to
use a one-shot idler handler, combined with a template function:
template<class T> bool delete_when_idle (T* obj) {
delete obj;
}
... signal_idle().connect (bind
(ptr_fun(delete_when_idle<TypeOfObject>), obj));
_______________________________________________
gtkmm-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/gtkmm-list