AMTumblrHud
AMTumblrHud copied to clipboard
memory issue in method
hey , the method doAnimateCycleWithRects.
the _weak is not needed //__weak typeof(self) wSelf = self; //weak issue should be typeof(self) wSelf = self;
-
(void)doAnimateCycleWithRects:(NSArray *)rects { //__weak typeof(self) wSelf = self; //weak issue
typeof(self) wSelf = self;
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t) (0.25 * 0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ [wSelf animateRect:rects[0] withDuration:0.25]; dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t) (0.25 * 0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ [wSelf animateRect:rects[1] withDuration:0.2]; dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t) (0.2 * 0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ [wSelf animateRect:rects[2] withDuration:0.15]; }); }); }); dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t) (0.6 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ [wSelf doAnimateCycleWithRects:rects]; }); }
@Asich how come you re opened the issue?
@shattars3d Accidentally) Are you sure that there is no need for "weak"? How did you come up with it? How did you check that?
well i think depending in the developer is using are or not... I'm using arc so I personally wouldn't need to too call the extra _weak