Refcounting bug

Ross Burton ross at burtonini.com
Wed Jun 29 03:27:32 PDT 2005


Hi,

When the Glib bindings calls an object method but the call is marked as
async (so the return isn't handled straight away), the GValue of the
object isn't unset, so the refcount isn't reset after the call.

This resulted in an object I expected to be finalised having a refcount
of over 100 in one test... )

Attached is a patch to move the g_value_unset to the same place as the
set, making the code neater and fixing the bug.

Ross
-- 
Ross Burton                                 mail: ross at burtonini.com
                                          jabber: ross at burtonini.com
                                     www: http://www.burtonini.com./
 PGP Fingerprint: 1A21 F5B0 D8D0 CFE3 81D4 E25A 2D09 E447 D0B4 33DF

-------------- next part --------------
A non-text attachment was scrubbed...
Name: dbus-value-unset.diff
Type: text/x-patch
Size: 690 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/dbus/attachments/20050629/dc0f917f/dbus-value-unset.bin


More information about the dbus mailing list