Re: [Re: [Re: [Re: [Re: [Re: [Re: [[gtkmm] technical question: GTKMM_LIFECYCLE]]]]]]]



Am 02.10.2002 11:25 schrieb(en) Murray Cumming:
> Do we want the gtk containers on destruction to force
> the destruction of our objects

Yes we do. That's what GTK+ does and that's what we wrap. We already
default
to the more C++-like behaviour so I don't see a need to add a 3rd system
just
yet. It's something that you could think about for gtkmm3 but it must be
gtkmm-wide, not just for gstreamer.

Okay. I will search the ml for Karls comments about manage() I have
in mind that tell something different about the meaning of manage().
Meanwhile I can life with the policy in gtkmm as I have before.
However you must notice that gstmm must be different because gstreamer's
containers don't force the destruction of their children. Since the use
of boost::shared_ptr<> doesn't work with unmanage()ed objects I will
keep things like I have implemented them at the moment and recommend
users to write "Gst::RefPtr<Gst::Pad> my_pad = Gst::manage(new Gst::Pad);"
(or whatever the smartpointer will be named) if they want the lifetime
of their objects to be controled by a reference counter.

Regards,

  Martin



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