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: Chris Ridd <email@hidden>
- Date: Sat, 05 Feb 2005 08:35:36 +0000
On 5/2/05 6:11 am, Kevin Ballard <email@hidden> 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)
Actually the runtime /is/ guaranteed to set all ivars to 0 (apart from the
isa ivar) in the alloc methods.
<http://developer.apple.com/documentation/Cocoa/Conceptual/ObjectiveC/Runtim
eOverview/chapter_4_section_2.html#//apple_ref/doc/uid/20001425/TPXREF115>
aka "Allocating and Initializing Objects" in the "Memory Management" chapter
of the "Objective-C Programming Language" book.
Cheers,
Chris
_______________________________________________
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