ncapdevi/FragNav

FragNavController.HIDE and memory leak

hosseinaminii opened this issue · 1 comments

Hi
It is the first time that I'm creating a single activity application. Now I'm using FragNavController.HIDE to prevent recreating fragments when the user presses the back button or changes the tabs in BottomNavigation, but somewhere I read that hide/show fragments will cause a memory leak. Now I want to know is it true? and do you have any suggestion for preventing fragment from recreation?

Thanks a lot

Hey @hossein-amini That question is specific to Android and not FragNav. Those types of questions have been answered many times https://stackoverflow.com/questions/9156406/whats-the-difference-between-detaching-a-fragment-and-removing-it https://stackoverflow.com/questions/13149446/android-fragments-when-to-use-hide-show-or-add-remove-replace . Please use the issue section of this library for FragNav specific questions/issues