Re: How to adjust refCount?
Re: How to adjust refCount?
- Subject: Re: How to adjust refCount?
- From: עפרי <email@hidden>
- Date: Mon, 12 Dec 2005 14:30:29 +0200
Take a look at NSDecrementExtraRefCountWasZero(), NSExtraRefCount()
and NSIncrementExtraRefCount().
- Ofri
On 12/12/2005, at 08:38, Steve Weller wrote:
I am following (and understanding) the Apple documentation on
implementing -copyWithZone and -mutableCopyWIthZone.
My code needs to adjust refCount to 1 since the copy of the object
made by the superclass's -copyWithZone was a shallow copy. But how
do I do that? There seems to be no instance variable or method I
can use called refCount that I can assign 1 to. Do I need to
#import anything extra?
I see that NSObject has retainCount, but the Apple docs (Memory
management -> Implementing Object Copy -> Figure [1 Initialization
of the reference count during a copy] and nearby text) explicitly
refer to refCount. Is this a documentation error?
--
Watch me learn Cocoa http://homepage.mac.com/bagelturf/
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40gmail.com
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden