• 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: Is the "id" type an immovable pointer? Or a movable handle
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Is the "id" type an immovable pointer? Or a movable handle


  • Subject: Re: Is the "id" type an immovable pointer? Or a movable handle
  • From: Matt Neuburg <email@hidden>
  • Date: Fri, 02 Feb 2007 10:43:41 -0800
  • Thread-topic: Is the "id" type an immovable pointer? Or a movable handle

On Wed, 31 Jan 2007 18:06:56 -0500, Ken Tozier <email@hidden> said:
>if objects don't move around in memory after allocation, I
>could just package the id to an NSNumber and use that for the key.
>
>Anyone know if ids are pointers or handles?

The pre-X distinction between pointers and handles is obviated by Mac OS X
memory management. Under Mac OS X, objects move around in memory all the
time (unless they are explicitly wired down). But your code doesn't know
about this, because there is a virtual memory map between your code and the
actual storage. In other words, under Mac OS X, *all* pointers are actually
handles. Sort of. Anyway, this clearly isn't what you wanted to know. :) m.

--
matt neuburg, phd = email@hidden, <http://www.tidbits.com/matt/>
A fool + a tool + an autorelease pool = cool!
AppleScript: the Definitive Guide - Second Edition!
<http://www.amazon.com/gp/product/0596102119>



_______________________________________________

Cocoa-dev mailing list (email@hidden)

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: Is the "id" type an immovable pointer? Or a movable handle
      • From: John Stiles <email@hidden>
  • Prev by Date: Re: Spreadsheet functions in NSTableview
  • Next by Date: Re: Is the "id" type an immovable pointer? Or a movable handle
  • Previous by thread: Re: Is the "id" type an immovable pointer? Or a movable handle
  • Next by thread: Re: Is the "id" type an immovable pointer? Or a movable handle
  • Index(es):
    • Date
    • Thread