diff --git a/NSTimer+Blocks.m b/NSTimer+Blocks.m index b7df0d8..cc106a5 100644 --- a/NSTimer+Blocks.m +++ b/NSTimer+Blocks.m @@ -13,7 +13,9 @@ +(id)scheduledTimerWithTimeInterval:(NSTimeInterval)inTimeInterval block:(void ( { void (^block)() = [inBlock copy]; id ret = [self scheduledTimerWithTimeInterval:inTimeInterval target:self selector:@selector(jdExecuteSimpleBlock:) userInfo:block repeats:inRepeats]; +#if !__has_feature(objc_arc) [block release]; +#endif return ret; } @@ -21,7 +23,9 @@ +(id)timerWithTimeInterval:(NSTimeInterval)inTimeInterval block:(void (^)())inBl { void (^block)() = [inBlock copy]; id ret = [self timerWithTimeInterval:inTimeInterval target:self selector:@selector(jdExecuteSimpleBlock:) userInfo:block repeats:inRepeats]; +#if !__has_feature(objc_arc) [block release]; +#endif return ret; }