Message: 6
Date: Sat, 02 Jan 2010 14:44:21 -0500
From: Charles Jenkins <cjenk...@tec-usa.com>
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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to