On Wed, 2007-06-06 at 12:40 -0500, Paul Davis wrote:
> You can also put the object into a smart pointer. I'd recommend
> boost's shared_ptr.

just be very carefeul with shared_ptr and sigc slots. if you ever do
this:

        bind (mem_fun (someObject, &SomeObject::method), aSharedPtrToFoo);

then the created slot holds a reference to Foo that may be hard to get
rid of. if you program sets up objects and only destroys them at
shutdown, if at all, this is not an issue. but if you need careful
management over object lifetimes, this can be a very nasty combination
of two very nice programming idioms.

--p



_______________________________________________
gtkmm-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/gtkmm-list

Reply via email to