Honour refcounting on release
authorEnrico Zini <enrico@enricozini.org>
Sun, 28 Mar 2010 11:52:56 +0000 (12:52 +0100)
committerEnrico Zini <enrico@enricozini.org>
Sun, 28 Mar 2010 11:52:56 +0000 (12:52 +0100)
src/core.vala

index ade1231781311bb371d944e4c7dc75507e5df591..2e2191550fcb8d7a948b4538d7fd509a7f34f721 100644 (file)
@@ -141,7 +141,9 @@ public abstract class Service : Object, Resource {
         if (el == null)
             return false;
 
-        requests.delete_link(el);
+        ++el.data.count;
+        if (el.data.count == 0)
+            requests.delete_link(el);
 
         if (requests != null)
             return false;