Re: Glib::wrap with copy=true semantics?



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. 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.

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.

--phil



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