• 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: Releasing Objects
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Releasing Objects


  • Subject: Re: Releasing Objects
  • From: John Engelhart <email@hidden>
  • Date: Thu, 24 Dec 2009 03:23:11 -0500

On Wed, Dec 23, 2009 at 12:05 PM, Bill Bumgarner <email@hidden> wrote:

>
> On Dec 22, 2009, at 11:49 PM, Franck Zoccolo wrote:
>
> > You said that you're using garbage collection. When using GC retain and
> > release messages do nothing, and the retain count is not used to
> > determine when an objet can be freed from memory.
>
> If -retainCount is returning 1, then he can't be using GC.   Under GC,
> -retainCount -- being the utterly useless method that it is that no one
> should ever call -- returns self.
>
> b.bum


Wait, what?  I could understand that under GC -retain might be nothing more
than the equivalent of "- (id)retain { return(self); }", but -retainCount?
 Is it really "- (NSUInteger)retainCount { return((NSUInteger)self); }" ?
 Wouldn't it make more sense to just return 1, or maybe something like
NSUIntegerMax?
_______________________________________________

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

  • Follow-Ups:
    • Re: Releasing Objects
      • From: Ken Thomases <email@hidden>
References: 
 >Releasing Objects (From: Michael Craig <email@hidden>)
 >Re: Releasing Objects (From: Franck Zoccolo <email@hidden>)
 >Re: Releasing Objects (From: Bill Bumgarner <email@hidden>)

  • Prev by Date: Re: NSCollectionView NSArrayController bindings from outer hell
  • Next by Date: Is there a warning for this?
  • Previous by thread: Re: Releasing Objects
  • Next by thread: Re: Releasing Objects
  • Index(es):
    • Date
    • Thread