Open tatowilson opened 5 years ago
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.
3.10.2
dealloc
I found the _progressTargetTimer may never be invalid if the progress didn't reach the end. https://github.com/yannickl/YLProgressBar/blob/c7b29a65f2834a398214970b963a23d3d859956e/YLProgressBar/YLProgressBar.m#L326-L342
_progressTargetTimer
So I wrote this in the host view's dealloc method to invalidate the _progressTargetTimer:
_progressBar.progress = 0;
https://github.com/yannickl/YLProgressBar/blob/c7b29a65f2834a398214970b963a23d3d859956e/YLProgressBar/YLProgressBar.m#L227-L230 https://github.com/yannickl/YLProgressBar/blob/c7b29a65f2834a398214970b963a23d3d859956e/YLProgressBar/YLProgressBar.m#L287-L322
The dealloc method was called finally.
First of all, thank yannickl for this awesome project.
We imported the version
3.10.2
into our project, and found that thedealloc
method was never called.I found the
_progressTargetTimer
may never be invalid if the progress didn't reach the end. https://github.com/yannickl/YLProgressBar/blob/c7b29a65f2834a398214970b963a23d3d859956e/YLProgressBar/YLProgressBar.m#L326-L342So I wrote this in the host view's
dealloc
method to invalidate the_progressTargetTimer
:https://github.com/yannickl/YLProgressBar/blob/c7b29a65f2834a398214970b963a23d3d859956e/YLProgressBar/YLProgressBar.m#L227-L230 https://github.com/yannickl/YLProgressBar/blob/c7b29a65f2834a398214970b963a23d3d859956e/YLProgressBar/YLProgressBar.m#L287-L322
The
dealloc
method was called finally.