• 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: Matt Neuburg <email@hidden>
  • Date: Sat, 2 Jan 2010 21:26:34 -0800


Message: 6
Date: Sat, 02 Jan 2010 14:44:21 -0500
From: Charles Jenkins <email@hidden>
Subject: Why is [NSArray arrayWithObjects:] failing for me?

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

I think adding the strings to an array will retain them; that's why there aren't a bunch of retain calls here. setPlayerNameList should retain as well, so the only memory management I think I have to do here is release pnl once.

The only memory management you have to do here is that you mustn't release pnl at all. And you've violated that one. m.


_______________________________________________

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


  • Prev by Date: Re: Why is [NSArray arrayWithObjects:] failing for me?
  • Next by Date: [iPhone] how do I stop a running thread
  • Previous by thread: Re: Why is [NSArray arrayWithObjects:] failing for me?
  • Next by thread: Custom NSFormatter classes
  • Index(es):
    • Date
    • Thread