Skip to content

Commit

Permalink
Update MBProgressHUD.m
Browse files Browse the repository at this point in the history
Cancel scheduled task when -done called to fix memory issues.
  • Loading branch information
liuyaodong committed Feb 25, 2014
1 parent d775e8d commit 307ca57
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions MBProgressHUD.m
Expand Up @@ -363,6 +363,7 @@ - (void)animationFinished:(NSString *)animationID finished:(BOOL)finished contex
}

- (void)done {
[NSObject cancelPreviousPerformRequestsWithTarget:self];
isFinished = YES;
self.alpha = 0.0f;
if (removeFromSuperViewOnHide) {
Expand Down

0 comments on commit 307ca57

Please sign in to comment.