You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
That pool had a fix number of GifImageViews, and never re-created new GifImageView.
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:
gifImageView.getDrawable().recycle(); // leaving out null check and castgifImageView.setImageBitmap(asmallsizebitmapasathumbnail);
I'm not sure if this should be considered as a leak, and I'm sorry if I wasted anyone's time.
The text was updated successfully, but these errors were encountered:
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.
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.
The text was updated successfully, but these errors were encountered: