Re: [Pyobjc-dev] Cocoa/Objective-C equiv to __del__?
Brought to you by:
ronaldoussoren
From: Bob I. <bo...@re...> - 2003-08-19 23:57:39
|
On Tuesday, Aug 19, 2003, at 10:55 America/New_York, Zachery Bir wrote: > Since we're not using __init__() for Cocoa-derived objects (delegates > and the like), is there an analogous means for providing for cleanup, > like the __del__() method? dealloc is what you're looking for, but I'd imagine __del__ may also work, because the Python object doesn't get collected until the same time (or later) that it would get collected from ObjC land. http://developer.apple.com/documentation/Cocoa/Reference/Foundation/ ObjC_classic/Classes/NSObject.html#//apple_ref/doc/uid/20000050/dealloc I've never tried overriding this from PyObjC, but I would imagine it does the right thing. I'd take a look at the PyObjC examples and/or sourcecode to see if anyone is using it (or __del__). -bob |