Re: Problems with un-owned objects passed to closures in pygobject (gtk_cell_renderer_text_start_editing)

On 04.02.2013 03:39, Simon Feltman wrote:
I am starting to warm up to an idea where we simply never sink objects
and always follow the rules entailed by
ownership transference annotations already in place, with one caveat:
g_object_new is annotated as transfer full but can also return floating
references. In this case, we must check the returned type and not
believe the annotation when it returns InitiallyUnowned instances, but
instead treat it like transfer none and add a new ref.

What about custom implementations of classes that are supposed to take over floating refs? For example, how would you write a custom GtkContainer subclass in Python with your scheme? Wouldn't you then need a way to explicitly sink the floating ref?

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