• 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: Stumped on memory problem :(
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Stumped on memory problem :( (From: Jacob Rhoden <email@hidden>)

  • Prev by Date: Re: Visualization strategy/choosing a framework
  • Next by Date: Re: Immediate Nib Loading Error
  • Previous by thread: Re: Stumped on memory problem :(
  • Next by thread: Re: Stumped on memory problem :(
  • Index(es):
    • Date
    • Thread