• 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: Where's the leak?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Where's the leak?


  • Subject: Re: Where's the leak?
  • From: Jed Soane <email@hidden>
  • Date: Tue, 28 Mar 2006 15:32:24 +1200

The autoreleased objects are never being released. pngData is probably your main culprit. Try adding an autorelease pool in your loop like this:

On Mar 25, 2006, at 2:05 PM, Scott Harper wrote:


for(i=0; i<[fileList count]; i++) {
total++;

NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
[self writeNewFileFromSource:[fileList objectAtIndex:i] atLocation:tempPath withAidImage:base];
[pool release];
if((total % 250) == 0)
NSLog(@"Total thus far: %i", total);
}


Cheers
Jed
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Where's the leak? (From: Scott Harper <email@hidden>)

  • Prev by Date: Where's the leak?
  • Next by Date: NSTextView and ruler tab settings
  • Previous by thread: Where's the leak?
  • Next by thread: NSTextView and ruler tab settings
  • Index(es):
    • Date
    • Thread