Re: -alloc -init of an Object Instance Variable?
Re: -alloc -init of an Object Instance Variable?
- Subject: Re: -alloc -init of an Object Instance Variable?
- From: mmalcolm crawford <email@hidden>
- Date: Wed, 21 Jul 2004 21:36:02 -0700
On Jul 21, 2004, at 9:18 PM, Jerry Krinock wrote:
And then, to my surprise, run and crash! If I comment out:
//myArray = [[NSMutableArray alloc] init] ;
then it works OK again.
From the results of this "experiment", I conclude that, when an object
is
initialized, Objective-C automatically initializes its object instance
variables.
From the experiment I conclude there's something else wrong somewhere.
Remember that sending a message to nil is simply a no-op...
Instance variables are certainly not automatically initialised in the
way you suggest.
Are you using an NSArrayController somewhere? You can specify that it
"automatically prepares [its] content"...
mmalc
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.