Re: Stumped on memory problem :(
Re: Stumped on memory problem :(
- Subject: Re: Stumped on memory problem :(
- From: Sherm Pendley <email@hidden>
- Date: Tue, 6 Jan 2009 03:59:17 -0500
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 (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