GifImageView icon indicating copy to clipboard operation
GifImageView copied to clipboard

Memory leak due to rapid toggle of animation

Open mrhubbs opened this issue 3 years ago • 0 comments

I'm using a GifImageView in situation where the animation is stopped and started very rapidly for a period of time. This toggling can happen as frequently as <10 milliseconds. This creates a memory leak which eventually crashes my app.

From the code here, it looks like the thread which runs the animation is not actually stopped on the call to stopAnimation.

https://github.com/felipecsl/GifImageView/blob/master/library/src/main/java/com/felipecsl/gifimageview/library/GifImageView.java#L184

Am I correct in that and, if so, what is the reason for this behavior?

mrhubbs avatar Mar 29 '22 15:03 mrhubbs