Comment 3 for bug 1270073

Revision history for this message
Markus Engel (engelmarkus) wrote :

Until r12532, objects are ref-counted using gobject.
You *must not* call delete on these objects as they have not been created by calling new, but by g_new. Increasing and decreasing the counter is done by calling g_object_ref and g_object_unref. sp_object_ref and sp_object_unref are simply wrappers for these functions.
In r >= 12532, gobject is not used anymore and ref-counting is done manually. This explains this "if (refCount <= 0) { delete object; }".
When the old reference counting-code really causes memory leaks, current trunk probably still has this issue somewhere.