Re: The recommended way to destroy a Gtk::Dialog on response?
- From: Paul Davis <paul linuxaudiosystems com>
- To: Paul Davis <pjdavis engineering uiowa edu>
- Cc: Toralf Lund <toralf procaptura com>, Murray Cumming <murrayc murrayc com>, GTK-- Mailing List <gtkmm-list gnome org>
- Subject: Re: The recommended way to destroy a Gtk::Dialog on response?
- Date: Wed, 06 Jun 2007 13:45:24 -0400
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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]