• 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: Hard calculation crashes after 60Minutes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Hard calculation crashes after 60Minutes


  • Subject: Re: Hard calculation crashes after 60Minutes
  • From: Nathan Vander Wilt <email@hidden>
  • Date: Sun, 31 Aug 2008 00:08:35 -0700

On Aug 30, 2008, at 8:08 PM, Mr. Gecko wrote:
Hello I am making a program that does a really hard calculation and it seems to crash after 60 Minutes. I don't really know why it does, I am guessing it is because I am using a for loop that takes awhile to run

If you can't find any leaks, it may be that autoreleased objects are not really "leaking", but your code does not give the framework- supplied autorelease pool a chance to release the objects it owns. You should create a pool of your own around the top and bottom of your loop's block:


for (long_time) {
	NSAutoreleasePool* myPool = [NSAutoreleasePool new];
	// do stuff....
	[myPool release];		// or you could use [myPool drain] if on 10.4+
}


hope this helps, -natevw _______________________________________________

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: 
 >Hard calculation crashes after 60Minutes (From: "Mr. Gecko" <email@hidden>)

  • Prev by Date: Re: CoreData and mutableArrayValueForKey:
  • Next by Date: Re: Target change problem
  • Previous by thread: Re: Hard calculation crashes after 60Minutes
  • Next by thread: Hard calculation crashes after 60Minutes
  • Index(es):
    • Date
    • Thread