sequence-layout
sequence-layout copied to clipboard
Causes Memory Leak when used in Fragment
I have single activity layout architecture in my project. So, I use fragments for everything.
The problem with fragments is that their views get destroyed when onViewDestroyed is called. Let's say I go to next screen, then the previous Fragment's views will get destroyed. Therefore we need to clear the reference to the view we may be holding to prevents leaks.