Re: Can I assume uninitialized variable's value to be nil or 0?
Re: Can I assume uninitialized variable's value to be nil or 0?
- Subject: Re: Can I assume uninitialized variable's value to be nil or 0?
- From: Shawn Erickson <email@hidden>
- Date: Wed, 17 May 2006 20:14:29 -0700
On May 17, 2006, at 8:04 PM, Eric wrote:
Can I assume declared but uninitialized variable to have the value
of nil
(for pointer type) or 0 (for numeric type)?
The objective-c runtime ensures that member variables will be
initialized to zero when memory for an object is allocated. It makes
no other assurances (local variables aren't zeroed, etc.).
-Shawn
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden