• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Newbie problem with NSMutableArray
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Newbie problem with NSMutableArray


  • Subject: Re: Newbie problem with NSMutableArray
  • From: j o a r <email@hidden>
  • Date: Wed, 6 Sep 2006 21:49:11 +0200

Hej Marcus,

On 6 sep 2006, at 21.14, Marcus Pedersén wrote:

I init my array in init message: myMutArray = [NSMutableArray arrayWithCapacity:1]

It sounds like this is an instance variable, in which case you need to use the regular instantiation pattern:


myMutArray = [[NSMutableArray alloc] init];

...and don't use the factory method that returns an "autoreleased" object.

Like Nick said, check the memory management documentation.

j o a r


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

References: 
 >Newbie problem with NSMutableArray (From: Marcus Pedersén <email@hidden>)

  • Prev by Date: Re: Getting HTTP headers from a WSMethodInvocationRef
  • Next by Date: Screen device name?
  • Previous by thread: Re: Newbie problem with NSMutableArray
  • Next by thread: Re: Newbie problem with NSMutableArray
  • Index(es):
    • Date
    • Thread