[Issue #56] Fixing 'The Dealloc Problem'

This commit is contained in:
Mattt Thompson 2011-10-10 13:05:22 -05:00
parent db3dddb03b
commit ce9872965c

View file

@ -147,10 +147,10 @@ static inline NSString * AFKeyPathFromOperationState(AFOperationState state) {
[super setCompletionBlock:nil]; [super setCompletionBlock:nil];
} }
__block id _blockSelf = [self retain]; __block id _blockSelf = self;
[super setCompletionBlock:^ { [super setCompletionBlock:^ {
block(); block();
[_blockSelf autorelease]; [_blockSelf setCompletionBlock:nil];
}]; }];
} }