• 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: NSDictionary, allKeys and the NSAutoreleasePool
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSDictionary, allKeys and the NSAutoreleasePool


  • Subject: Re: NSDictionary, allKeys and the NSAutoreleasePool
  • From: David Duncan <email@hidden>
  • Date: Thu, 3 Sep 2009 09:59:06 -0700

This is essentially correct. Why bother to decrement the retain count when the object is going away after all...

On Sep 3, 2009, at 7:29 AM, Graham Cox wrote:

Relying on retain counts to tell you an object's state is not a good idea. What I'm guessing is that the code internally looks something along the lines of:

- (void) release
{
  if( retainCount == 1 )
	[self dealloc];
  else
      --retainCount;
}

-- David Duncan Apple DTS Animation and Printing

_______________________________________________

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


References: 
 >NSDictionary, allKeys and the NSAutoreleasePool (From: Horst Jäger <email@hidden>)
 >Re: NSDictionary, allKeys and the NSAutoreleasePool (From: Graham Cox <email@hidden>)

  • Prev by Date: Re: iPhone-detecting call event...
  • Next by Date: Re: Handling NSApplicationDefined events
  • Previous by thread: Re: NSDictionary, allKeys and the NSAutoreleasePool
  • Next by thread: Re: NSDictionary, allKeys and the NSAutoreleasePool
  • Index(es):
    • Date
    • Thread