Open LionHere opened 5 years ago
Could you share a minimal project which reproduces this issue?
Could you share a minimal project which reproduces this issue?
hope this could help: LionHere/AndroidGIFDrawableDemo
Thanks, I'll check this
Thanks, I haven't considered such usage.
It seems that there is no leak but due to the fact GifDrawable
uses single Executor for all instances by default, subsequent actions are scheduled more frequently than they can be purged.
I'll analyze this deeper and get back.
Encountered a situation of possible memory leak, or was it a misusage?
My code was like this:
That pool had a fix number of
GifImageView
s, and never re-created newGifImageView
. Runing this binding function a dozens of time bumped the natvie heap from 30mb to ~200mb, and forcing gc would not help.I fix this by manually recycling
GifDrawable
before#setImageBitmap
:I'm not sure if this should be considered as a leak, and I'm sorry if I wasted anyone's time.