• 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: Sat, 12 Jul 2008 10:24:37 -0700


On Jul 12, 2008, at 8:25 AM, Michael Ash wrote:

On Sat, Jul 12, 2008 at 2:25 AM, Marcel Weiher <email@hidden > wrote:

So as I said: (a) object allocation slowest (b) out-of-band retain count
slow (c) inline retain count much faster than either.

Well that all makes sense, thanks.

You're very welcome :-)

One further question for you, if you will. I got curious and went off
hunting for the inline refcount in NSCFString but couldn't find it.

Yeah, NSCFString doesn't actually declare any of "its" instance variables, which are actually those of the private CFString structure it uses.


The closest I got was the '_rc' field in CFRuntimeBase, but it's
inside an #if __LP64__ clause, so we don't get it in normal code these
days. The __CFString struct doesn't seem to have any place to store a
refcount. Am I missing something here, or does it only have an inline
refcount in 64-bit?

No, the inline reference count is available for all CF objects, and not limited to 64 bit.


What version of the structure are you looking at? For example http://www.cocoadev.com/index.pl?HowToCreateTollFreeBridgedClass shows this version, which matches what I got from opensource.apple.com


/* All CF "instances" start with this structure. Never refer to * these fields directly -- they are for CF's use and may be added * to or removed or change format without warning. Binary * compatibility for uses of this struct is not guaranteed from * release to release. */ typedef struct __CFRuntimeBase { void *_isa; #if defined(__ppc__) uint16_t _rc; uint16_t _info; #elif defined(__i386__) uint16_t _info; uint16_t _rc; #else #error unknown architecture #endif } CFRuntimeBase;

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>
    • Re: garbage collection and NSConnection
      • From: "Gary L. Wade" <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: Trashing files and undo
  • Next by Date: Servicing Core Animations?
  • Previous by thread: Re: garbage collection and NSConnection
  • Next by thread: Re: garbage collection and NSConnection
  • Index(es):
    • Date
    • Thread