Re: Memory Management Question
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