Closed Flyktsodan closed 2 years ago
To avoid memory leaks, many will manually set the adapter of the ViewPager(or 2) to null when destroying a fragment: https://charlesmuchene.com/a-subtle-memory-leak-fragment-recyclerview-and-its-adapter
The force unwrap of the adapter will sometimes crash with a NPE. Fixed this by adding small private extensions to safely get the size of the adapter instead.
This is very much needed, we're seeing crashes in production due to this exact issue.
Hello @Flyktsodan thanks for your contribution This issue is now fixed in the new version 4.3 Thanks 🔥
4.3
To avoid memory leaks, many will manually set the adapter of the ViewPager(or 2) to null when destroying a fragment: https://charlesmuchene.com/a-subtle-memory-leak-fragment-recyclerview-and-its-adapter
The force unwrap of the adapter will sometimes crash with a NPE. Fixed this by adding small private extensions to safely get the size of the adapter instead.