• 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: Problem instantiating an array
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem instantiating an array


  • Subject: Re: Problem instantiating an array
  • From: Ken Thomases <email@hidden>
  • Date: Tue, 7 Dec 2010 03:01:38 -0600

On Dec 7, 2010, at 2:40 AM, Graham Cox wrote:

> On 07/12/2010, at 5:35 PM, Ken Thomases wrote:
>
>>> gameColumns = [NSArray arrayWithObjects:allColumns count: boardDimension];
>
> Another issue with this line is that, assuming 'gameColumns' is an instance variable of the object, the array will be autoreleased, leaving the variable pointing at deallocated memory, which will surely crash later.

Yeah.  I got sidetracked by the other issues enough that I didn't even get around to considering the memory management problems.  Conrad Shultz addressed another, with the TileColumn instances in the allColumns array.

Regards,
Ken

_______________________________________________

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: 
 >Problem instantiating an array (From: Dennis Birch <email@hidden>)
 >Re: Problem instantiating an array (From: Ken Thomases <email@hidden>)
 >Re: Problem instantiating an array (From: Graham Cox <email@hidden>)

  • Prev by Date: QT streaming with initWithAttributes
  • Next by Date: Re: problem with core data and uno
  • Previous by thread: Re: Problem instantiating an array
  • Next by thread: Re: Problem instantiating an array
  • Index(es):
    • Date
    • Thread