# HG changeset patch # User William Welliver # Date 1633113049 14400 # Fri Oct 01 14:30:49 2021 -0400 # Node ID 90d1222a946969daef6efac98ad48def1a71abd1 # Parent f7cb2d2e31e577183df8d0135136a48ee2c9aacf fix memory leaks diff --git a/PiObjCObject.m b/PiObjCObject.m --- a/PiObjCObject.m +++ b/PiObjCObject.m @@ -110,9 +110,9 @@ - (id)retain { - LOG("PiObjCObject.retain()%s\n", ""); - if(pobject) - add_ref(pobject); + LOG("PiObjCObject.retain(%p)\n", self); +// if(pobject) +// add_ref(pobject); return [super retain]; } @@ -132,9 +132,10 @@ - (id)release { - LOG("PiObjCObject.release()%s\n", ""); - if(pobject) - free_object(pobject); + LOG("PiObjCObject.release(%p)\n", self); + +// if(pobject) +// free_object(pobject); [super release]; } @@ -532,7 +533,7 @@ // pobject = Pike_sp[-1].u.object; add_ref(pobject); add_ref(prog); -// LOG("* setting the object's instance variable: %p, %p, %p\n", obj, pobject, old_object_setInstanceVariable); + LOG("* setting the object's instance variable: %p, %p, %p\n", obj, pobject, old_object_setInstanceVariable); // object_setInstanceVariable(obj, "pobject", pobject); old_object_setInstanceVariable(obj, "pobject", pobject);