Re: Strange Retain Count?
Re: Strange Retain Count?
- Subject: Re: Strange Retain Count?
- From: Ryan Britton <email@hidden>
- Date: Mon, 21 Nov 2005 20:17:37 -0800
It could be correct. It depends partially on what all happens in the
init method. It's very possible something else retains it from
something called in there. You generally can't assume that the
retain count will be a certain value because you have no control over
what happens behind the scenes.
On Nov 21, 2005, at 8:10 PM, Brian O'Brien wrote:
testClass *test = [[[testClass alloc] init] autorelease];
NSLog(@"test retain count = %d", [test retainCount]);
Prints out:
2005-11-21 21:05:54.165 testDNewServer[2090] test retain count = 2
Is 2 right????
I thought it should be one..
_______________________________________________
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
_______________________________________________
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