I was profiling my app and noticed that my closed dialog is not being garbage collected. Then I checked the references and found out that the FragNavController was holding a ref, namely the mCurrentDialogFrag field.
I suggest you make a weak reference to the current dialog frag instead of a strong reference for such cases.
I was profiling my app and noticed that my closed dialog is not being garbage collected. Then I checked the references and found out that the FragNavController was holding a ref, namely the mCurrentDialogFrag field. I suggest you make a weak reference to the current dialog frag instead of a strong reference for such cases.