gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: EOFault / NSAutoreleasePool


From: David Ayers
Subject: Re: EOFault / NSAutoreleasePool
Date: Thu, 13 Mar 2008 20:11:36 +0100
User-agent: Mozilla-Thunderbird 2.0.0.9 (X11/20080110)

Richard Frith-Macdonald schrieb:
> 
> On 13 Mar 2008, at 16:32, David Ayers wrote:
> 
>> Richard Frith-Macdonald schrieb:
>>>
>> - It is invalid to call methods that auto release any objects during
>> dealloc/release for any object because these methods get called during
>> -emptyPool,
> 
> No ... or at least I mean, if so I don't understand your reasoning.
> Can you say why you think that an object which is being deallocated
> should not autorelease anything?  My belief is that objects being
> deallocated should be free to autorelease things.  Maybe the Apple
> documentation says otherwise somewhere though.

This is interesting... I do remember that being an issue before... but I
just verified that that even with the old WO45 implementation that works
fine.

>> And firing EOFaults (what actually happened to NSFaults? I remember
>> discussing those a once) will do exactly that.  It generally implies
>> database access, creating many auto released objects to populate the
>> attribute instance variables including accessor methods which all could
>> validly call autorelease.
> 
> Sure, but as far as I know that's fine.  Anything which is autoreleased
> during emptying of a pool should just get added to the end of the pool 
> and then released later during the emptying. Barring bugs of course.

I stand corrected.  It seems valid to call autorelease during dealloc
implementations.  Still I don't believe that arbitrary IMP caching is
valid (see my NSDistantObject reference to Fred's mail.)

But for EOFaults would assume that retain cycles would not be broken if
the got got fired during autorelease as relationships would re-add the
object to relationships retaining them again.

>> So, yes I do think the patch needs to [be] reverted.
> 
> OK.

Thanks!

Cheers,
David




reply via email to

[Prev in Thread] Current Thread [Next in Thread]