Re: Glib::wrap with copy=true semantics?
- From: Murray Cumming <murrayc murrayc com>
- To: Philip Langdale <plangdale vmware com>
- Cc: gtkmm-list mail gnome org
- Subject: Re: Glib::wrap with copy=true semantics?
- Date: Fri, 04 Mar 2005 19:09:29 +0100
On Fri, 2005-03-04 at 10:03 -0800, Philip Langdale wrote:
> Murray Cumming wrote:
> >
> > Like I said, we don't refcount GtkAdjustments, and I don't recommend
> > that you do.
>
> The whole point is that passing copy=true to the Glib::wrap call is
> that it does increment the refcount which is then not decremented
> when the wrapper is deleted.
And I explained why you shouldn't do that.
> So it's doing something with the refcount.
>
> I'm just asking whether this is the intended semantics of Glib::wrap
> or not. It is definitely unexpected for the wrapper to come and go
> and leave the ref count at +1.
The take_copy parameter is only for use with RefPtr<>.
> I have no problem passing copy=false in which case it won't touch
> the refcount but the documented semantics for copy=false are that
> the wrapper takes ownership of the object which is not what is going
> on here.
OK. A documentation patch would be welcome.
--
Murray Cumming
murrayc murrayc com
www.murrayc.com
www.openismus.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]