Le 27 avr. 2010 à 21:57, Jens Alfke a écrit :

>> I registered most curious behaviors, for example objects released while the 
>> last time their retain count was printed it was equal to 2. No 1, no 0. 
>> That's why I asked, just to know if autorelease does not short-circuit the 
>> traditional release: call by accessing the retain count directly.
> 
> That sounds like an optimization in the runtime to avoid a couple of 
> message-sends. You shouldn't override -retain or -release or make assumptions 
> about how many times they're called; those are implementation details.

That's what I inferred too, and that's why I supposed the autorelease pool 
pokes directly somehow in retain counts to rise performance, but it may be, as 
you say, some optimizing behavior at runtime.

Ok, forget it. Extremely interesting, but I feel this thread is, as we say in 
French, a sea snake: we might never see its end.

Good night and thanks again!
Vincent_______________________________________________

Cocoa-dev mailing list ([email protected])

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to