• 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: garbage collection and NSConnection
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: garbage collection and NSConnection


  • Subject: Re: garbage collection and NSConnection
  • From: Marcel Weiher <email@hidden>
  • Date: Sun, 13 Jul 2008 09:29:42 -0700


On Jul 12, 2008, at 13:42 , Michael Ash wrote:


http://www.opensource.apple.com/darwinsource/projects/apsl/CF-476.10/CFRuntime.h

typedef struct __CFRuntimeBase {
   uintptr_t _cfisa;
   uint8_t _cfinfo[4];
#if __LP64__
   uint32_t _rc;
#endif
} CFRuntimeBase;

I guess this isn't the right one, then.

If you look at the corresponding CFRuntime.c file, I think you'll find that there is logic there for treating part of the _cfinfo as a retain count (look for _CFRetain() )


To Gary, about 16-bit refcounts, I'd imagine that there's some logic
in there where if you hit 0xFFFF, it considers that to be a flag to
use an external refcount instead, at the cost of some speed.

Yep. Inline reference counts are an optimization, as such they need to cater to the common case, not to the outliers (which still have to be handled correctly, but don't need to be as fast).


Cheers,

Marcel

_______________________________________________

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: garbage collection and NSConnection
      • From: "Michael Ash" <email@hidden>
References: 
 >Re: garbage collection and NSConnection (From: Marcel Weiher <email@hidden>)
 >Re: garbage collection and NSConnection (From: "Michael Ash" <email@hidden>)
 >Re: garbage collection and NSConnection (From: Marcel Weiher <email@hidden>)
 >Re: garbage collection and NSConnection (From: "Michael Ash" <email@hidden>)
 >Re: garbage collection and NSConnection (From: Marcel Weiher <email@hidden>)
 >Re: garbage collection and NSConnection (From: "Michael Ash" <email@hidden>)
 >Re: garbage collection and NSConnection (From: Marcel Weiher <email@hidden>)
 >Re: garbage collection and NSConnection (From: "Michael Ash" <email@hidden>)
 >Re: garbage collection and NSConnection (From: Marcel Weiher <email@hidden>)
 >Re: garbage collection and NSConnection (From: "Michael Ash" <email@hidden>)

  • Prev by Date: Re: [NSDate +dateWithNaturalLanguageString] question
  • Next by Date: Webkit and image redirects
  • Previous by thread: Re: garbage collection and NSConnection
  • Next by thread: Re: garbage collection and NSConnection
  • Index(es):
    • Date
    • Thread