Show
Ignore:
Timestamp:
02/28/10 16:03:40 (2 years ago)
Author:
gbooker
Message:

Added autorelease pools to reduce temporary memory usage and made sure containing directory exists on a file download.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/SapphireFrappliance/MetaDataImporting/SapphireScraper.m

    r1179 r1197  
    571571- (int)parseElement:(NSXMLElement *)element 
    572572{ 
     573        NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; 
    573574        NSArray *regexChildren = nil; 
    574575        NSString *value = nil; 
     
    602603         
    603604        [self parseExpression:element withInput:input intoDest:result andAppend:append]; 
     605        [pool drain]; 
    604606         
    605607        return result; 
     
    620622        } 
    621623        int dest = integerAttributeWithDefault(functionElement, @"dest", 1); 
    622         NSString *ret = scraperBuffers[dest - 1]; 
     624        NSString *ret = [[scraperBuffers[dest - 1] retain] autorelease]; 
    623625        if(booleanAttributeWithDefault(functionElement, @"clearbuffers", YES)) 
    624626                [self clearBuffers];