• 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
ObjectAlloc and objects that should have been released
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

ObjectAlloc and objects that should have been released


  • Subject: ObjectAlloc and objects that should have been released
  • From: Miles <email@hidden>
  • Date: Wed, 22 Apr 2009 19:19:15 -0700

I have a timer that continues calling a method that for the moment (testing
purposes) only contains:
NSArray *tmp = [NSArray arrayWithArray:animatingTilesArray];

The time is setup like this:
animationTimer    = [NSTimer scheduledTimerWithTimeInterval:0.5 target:self
selector:@selector(doAnimation:) userInfo:nil repeats:YES];

When I run this in ObjectAlloc, it shows that every instance of the 'tmp'
array created above is 'created and still living'. Considering it's an
auto-released array shouldn't there only be zero or one still living?
Just for fun I also tried:

   NSArray *tmp = [animatingTilesArray copy];
   [tmp release];

... but ObjectAlloc said the same thing. If I let this run for awhile my
ObjectAlloc trace continues to climb.

Anyone know why this is?
_______________________________________________

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

  • Follow-Ups:
    • Re: ObjectAlloc and objects that should have been released
      • From: Peter N Lewis <email@hidden>
  • Prev by Date: Re: How to: many users edit same file at the same time ?
  • Next by Date: Re: How to make app login window to look like OS X user login window ?
  • Previous by thread: Re: NSSearchField and Thai
  • Next by thread: Re: ObjectAlloc and objects that should have been released
  • Index(es):
    • Date
    • Thread