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 (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]