Re: [Pyobjc-dev] Memory management bug using .new()
Brought to you by:
ronaldoussoren
From: Ronald O. <ron...@ma...> - 2009-06-19 08:48:03
|
On 18 Jun, 2009, at 22:47, Orestis Markou wrote: > Hi Ronald, > > does that stand for other arbitrary class methods, like CALayer.layer > () as well? Is there a way to inform PyObjC of constructor class > methods? Or should we change our code to use alloc().init() instead? No. The only class methods that behave like alloc are alloc itself and anything that starts with 'new'. Regular class methods return autoreleased objects. The behaviour of method names that start with 'new' is newish, the last time I check (which was a couple of years ago), only +alloc returned a retained value. Ronald |