Re: Why is [NSArray arrayWithObjects:] failing for me?
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