A tip for "dealloc" method never be called
tatowilson opened this issue · comments
First of all, thank yannickl for this awesome project.
We imported the version 3.10.2
into our project, and found that the dealloc
method was never called.
I found the _progressTargetTimer
may never be invalid if the progress didn't reach the end.
YLProgressBar/YLProgressBar/YLProgressBar.m
Lines 326 to 342 in c7b29a6
So I wrote this in the host view's dealloc
method to invalidate the _progressTargetTimer
:
_progressBar.progress = 0;
YLProgressBar/YLProgressBar/YLProgressBar.m
Lines 227 to 230 in c7b29a6
YLProgressBar/YLProgressBar/YLProgressBar.m
Lines 287 to 322 in c7b29a6
The dealloc
method was called finally.