Status: New
Owner: ----
Labels: Type-Defect Priority-Medium
New issue 1177 by scampa.giovanni: ibus_engine_list_engines returns a
floating reference with (transfer full)
http://code.google.com/p/ibus/issues/detail?id=1177
ibus_engine_list_engines returns a newly created IBusEngineDesc, which
being a GInitiallyUnowned, is initially floating. But introspection
annotation says it is (transfer full).
As discussed on https://bugzilla.gnome.org/show_bug.cgi?id=638542,
(transfer full) means "you should unref the object yourself", which is
wrong for floating objects.
Two fixes are possible: g_object_ref_sink the object before adding it to
the list, or mark the function (transfer none). I personally prefer the
former, as it makes clearer memory management and avoids issues from C
code, if IBusEngineDesc is ref_sink'ed later.
Reproducible in version 1.3.9 (causes gjs to crash). I suppose it happens
in git master as well.
--
You received this message because you are subscribed to the Google
Groups "ibus-devel" group.
iBus project web page: http://code.google.com/p/ibus/
iBus dev group: http://groups.google.com/group/ibus-devel?hl=en