ncapdevi / FragNav

An Android library for managing multiple stacks of fragments
1.5k stars 210 forks source link

FragNavController.HIDE and memory leak #216

Closed hosseinaminii closed 5 years ago

hosseinaminii commented 5 years ago

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

ncapdevi commented 5 years ago

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