Re: [Pyobjc-dev] threads + autoreleasepools
Brought to you by:
ronaldoussoren
From: <bb...@ma...> - 2003-02-15 22:38:12
|
On Saturday, Feb 15, 2003, at 17:05 US/Eastern, Just van Rossum wrote: > However, creating an NSAutoreleasePool manually doesn't work the way I > think it should work: > >>>> NSAutoreleasePool.alloc().init() > Traceback (most recent call last): > File "<stdin>", line 1, in ? > ValueError: NSInvalidArgumentException - *** -[NSAutoreleasePool > retain]: Cannot retain an autorelease pool >>>> > > Any wisdom? Or is it a bug? A bug. Sort of. I added a category to NSAutoreleasePool to workaround the problem. See the test_nsautoreleasepool.py for details. NSAutoreleasePool.pyobjcPushPool() ... NSAutoreleasePool.pyobjcPopPool() recycle_autorelease_pool() is documented as not to be used by the general public. Looking at it, I'm not sure why the global release pool exists at all. b.bum |