On 17 Aug 2010, at 18:07, Ken Ferry wrote:
> On Tue, Aug 17, 2010 at 9:53 AM, Cem Karan <cfkar...@gmail.com> wrote:
> 
>> One dumb question; I see where you're putting images into an autorelease 
>> pool, but I don't see you setting up or tearing down pools.  Where are you 
>> doing that?
> 
> Or, it could be much easier than I was saying and you might just need an 
> autorelease pool.

Good question, but I had that covered - here's my main loop code
(with error handling snipped):

for (NSString *path in self.paths)
{
    // SNIP: User-initiated break-out check
    
    NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
    ImageSignature *sig = [self.net.factory signatureForPath:path];
    if (sig)
    {
        self.step = self.step + 1;
        [self.net feedforward:sig];
        [self processResponseForPath:path];
    }
    [pool release];
}

This all runs in the background via dispatch_async().

Stuart

_______________________________________________

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 arch...@mail-archive.com

Reply via email to