On Jan 1, 2009, at 8:14 PM, Jacob Rhoden wrote:

I have read the memory management documentation over and over but still cannot work out the problem with this code, can anyone see it? I have spent hours on this!

   NSMutableArray *array = [[NSMutableArray array] init];

+array returns an already-initialized object that you do not own. Given that you sent -init here and -autorelease later, you probably meant to use +alloc here.

sherm--

_______________________________________________

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