• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Strange Retain Count?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
  • Follow-Ups:
    • Re: Strange Retain Count?
      • From: "Brian O'Brien" <email@hidden>
References: 
 >Strange Retain Count? (From: "Brian O'Brien" <email@hidden>)

  • Prev by Date: Strange Retain Count?
  • Next by Date: Re: Strange Retain Count?
  • Previous by thread: Strange Retain Count?
  • Next by thread: Re: Strange Retain Count?
  • Index(es):
    • Date
    • Thread