Re: [Pyobjc-dev] Bridging NSMutableString, a compromise
Brought to you by:
ronaldoussoren
From: Ronald O. <ous...@ci...> - 2003-02-07 21:45:58
|
On Friday, Feb 7, 2003, at 22:31 Europe/Amsterdam, Just van Rossum wrote: > Btw. I noticed PyObjC tries to sync the refcounts for both objects in > class-builder.m's object_method_retain() and object_method_release() > calls. Why is this needed? This is for Python subclasses of Objective-C classes (and only those). Such instances have two parts, an Objective-C object and a Python object, that behave as if there is 1 object. Using 1 refcount for both parts is IMHO the only feaseable way to ensure that we don't end up with only one of the parts and that these objects are not immortal. Getting this right was one of the hardest elements of my rewrite of PyObjC, and something that really should be documented... Ronald |