Re: Efficient object wrappers and GC
Re: Efficient object wrappers and GC
- Subject: Re: Efficient object wrappers and GC
- From: David Duncan <email@hidden>
- Date: Fri, 11 Apr 2008 11:42:34 -0700
On Apr 11, 2008, at 10:25 AM, Buddy Kurz wrote:
I'm wondering if it would make sense (or be possible) to override -
retain and -release to increment/decrement your own variable in
addition to using the inherited behavior. In the GC environment,
the inherited retain does nothing but in either environment your
enumerator can detect the retain by checking your variable.
It isn't that the inherited retain(release/retainCount/autorelease) do
nothing, its that they are no-op'd. They are neutered at the the level
of message dispatcher which means that under GC your class will
*never* see these messages.
See <http://developer.apple.com/documentation/Cocoa/Conceptual/GarbageCollection/Articles/gcDesignPatterns.html
>
--
David Duncan
Apple DTS Animation and Printing
email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden