Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
[Android]FrameRenderer is creating new FrameDrawable every time BackgroundColor changes without disposing #5446
When the BackgroundColor or CornerRadius properties of a Frame are changed, the FrameRenderer (not the FastRenderer), creates a new instance of the FrameDrawable without disposing the previous instance.
For my project, we have multiple frames that have blinking background colors and over a couple minutes, the blinking visibly slows down, and if left long enough, the app crashes. Because the FrameDrawable isn't being disposed, the Bitmap is still using memory and the listener for the Frame's property changes is still listening and still drawing the background to the bitmap.
Steps to Reproduce
The frames should keep blinking at the same frequency (every 250ms)
After a couple minutes, the blinking of the frames slows down. The Android Choreographer will start to log that the UI thread is doing too much and that frames are being skipped. Eventually the app will crash due to running out of memory