Re: checking if an object's instance exists.
Re: checking if an object's instance exists.
- Subject: Re: checking if an object's instance exists.
- From: Kevin Ballard <email@hidden>
- Date: Sat, 5 Feb 2005 13:08:30 -0500
Ah hah. As I said "AFAIK" - I never saw that bit, so I didn't know. I
guess it *does* say that.
On the other hand, it's still nice to initialize ivars to null (or
whatever you want their default values to be) in the initializer for
clarity's sake.
On Feb 5, 2005, at 1:20 AM, Sherm Pendley wrote:
On Feb 5, 2005, at 1:11 AM, Kevin Ballard wrote:
You should also set object1 to nil in your init method to be safe
(AFAIK there's no docs saying ivars are zeroed when allocated, so I
wouldn't assume it)
Eh? It's right there in the description for +alloc:
"The isa instance variable of the new instance is initialized to a
data structure that describes the class; memory for all other instance
variables is set to 0."
--
Kevin Ballard
email@hidden
http://www.tildesoft.com
http://kevin.sb.org
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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