discuss-gnustep
[Top][All Lists]
Advanced

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

Re: Interesting difference in memory management of MacOS Foundation and


From: David Chisnall
Subject: Re: Interesting difference in memory management of MacOS Foundation and GNUstep
Date: Mon, 17 Feb 2014 13:39:39 +0000

On 17 Feb 2014, at 13:33, Mathias Bauer <mathias_bauer@gmx.net> wrote:

> in case somebody else is also interested in this: it seems that Apple's 
> runtime "protects" the developer by ignoring changes to the retain count as 
> soon as the object entered its deallocate method. Wrong decision, IMHO.

It is likely that this is a side effect of weak reference support.  Classes 
must notify the runtime when they start deallocation now, so that concurrent 
loads of weak references abort the deallocation.  Apple's implementation stores 
objects' refcounts in a map table, so once the object has entered deallocation 
it's likely just a separate path.  I wouldn't be surprised if this is not an 
active decision at all, however it does make adding cycle detection to ARC 
easier...

David




reply via email to

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