Re: Newbie problem with NSMutableArray
Re: Newbie problem with NSMutableArray
- Subject: Re: Newbie problem with NSMutableArray
- From: David Emme <email@hidden>
- Date: Wed, 6 Sep 2006 12:54:35 -0700
On Sep 6, 2006, at 12:14 PM, Marcus Pedersén wrote:
I init my array in init message: myMutArray = [NSMutableArray
arrayWithCapacity:1]
Your myMutArray is not retained by anybody, and is likely to
disappear at any time. Check the documentation regarding the
conventions about which object creation method names give you a
retained object and which ones don't.
Meanwhile, see if this doesn't solve your immediate problem (and make
sure you understand why it does):
myMutArray = [[NSMutableArray arrayWithCapacity:1] retain];
-Dave
--
Information is a measure of how surprised you are by the next bit.
-Robert McHenry
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