Re: Losing my memory - a caching problem?
Re: Losing my memory - a caching problem?
- Subject: Re: Losing my memory - a caching problem?
- From: Stuart Rogers <email@hidden>
- Date: Tue, 17 Aug 2010 21:05:57 +0100
On 17 Aug 2010, at 18:07, Ken Ferry wrote:
> On Tue, Aug 17, 2010 at 9:53 AM, Cem Karan <email@hidden> 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 (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