Re: [Pyobjc-dev] threads + autoreleasepools
Brought to you by:
ronaldoussoren
From: Just v. R. <ju...@le...> - 2003-02-16 19:37:31
|
Ronald Oussoren wrote: > >>>> 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? > > It is a bug. Are you using libffi? Yup. > I only get this error when not > using libffi. I just tried again after cvs up, same thing. > The problem is that NSInvocation seems to call retain > on the 'self' argument of the invocation. Bill's pyobjcPushPool/pyobjcPopPool stuff works fine, and it's arguably a better solution. (But looking at an autorelease pool in my Python code _does_ make make stomache turn ;-) > BTW. I'm not entirely sure that the bridge itself it thread-safe. I'll let you know when it crashes ;-) Just |