• 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: Why is [NSArray arrayWithObjects:] failing for me?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Why is [NSArray arrayWithObjects:] failing for me?


  • Subject: Re: Why is [NSArray arrayWithObjects:] failing for me?
  • From: Seth Willits <email@hidden>
  • Date: Sun, 3 Jan 2010 14:30:38 -0800

On Jan 2, 2010, at 11:44 AM, Charles Jenkins wrote:

>  NSArray* pnl = [NSArray arrayWithObjects:pa,pb,pc,pd,nil];
>  [parentDocument setPlayerNameList:pnl];
>  [pnl release];

KABOOM.

You are over-releasing pnl. The release call is unnecessary because the array was not alloc/init'd, made by copy, or had retain called on it within this method.

--
Seth Willits



_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Why is [NSArray arrayWithObjects:] failing for me?
      • From: Charles Jenkins <email@hidden>
    • Re: Why is [NSArray arrayWithObjects:] failing for me?
      • From: Seth Willits <email@hidden>
References: 
 >Why is [NSArray arrayWithObjects:] failing for me? (From: Charles Jenkins <email@hidden>)

  • Prev by Date: Re: NS_INLINE and obj = nil;?
  • Next by Date: Re: Why is [NSArray arrayWithObjects:] failing for me?
  • Previous by thread: Re: Why is [NSArray arrayWithObjects:] failing for me?
  • Next by thread: Re: Why is [NSArray arrayWithObjects:] failing for me?
  • Index(es):
    • Date
    • Thread