• 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: Memory Management Question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Memory Management Question


  • Subject: Re: Memory Management Question
  • From: Greg Parker <email@hidden>
  • Date: Mon, 2 Jul 2007 15:13:27 -0700

Uli Kusterer wrote:
On 02.07.2007, at 18:06, Clark Cox wrote:
Well, if the object is already nil, then sending a message to it is
essentially a no-op; so your check is probably redundant.

That's not quite true. It's only a no-op if it returns nothing (void) a pointer (id, or other object), or an int. If it returns anything else, messages to NIL are undefined.

More precisely:

Int-equivalents no larger than 64 bits: 0
Pointers: nil
Structs: undefined
Float, double, long double: 0.0 on i386; 0.0 on ppc 10.5 and later; undefined on ppc 10.4 and earlier
Everything else: undefined


You may treat these as Officially Documented and Supported and so on.


-- Greg Parker email@hidden Runtime Wrangler


_______________________________________________

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


  • Prev by Date: Re: Menubar windows are under other apps
  • Next by Date: "Visible at Launch Time" issue
  • Previous by thread: Re: Memory Management Question
  • Next by thread: Looking for NSCollectionView sample code
  • Index(es):
    • Date
    • Thread