This repository was archived by the owner on Dec 27, 2024. It is now read-only.
This repository was archived by the owner on Dec 27, 2024. It is now read-only.
Memory leaks for Carousel.java when View is getting recycled e.g. in RecyclerView #714
Open
Description
When Carousel.java is used within a RecyclerView and is getting attached and detached to the layout, the internal list "mList" holding the references for the child views gets bigger and bigger. As a result, the linking between internal data and displayed data gets out of sync, meaning wrong data gets displayed.
With every call of onAttachedToWindow the list grows but never gets cleared.
A simple fix might be to just clear the list when the Carousel gets detached from the view.