sequence-layout icon indicating copy to clipboard operation
sequence-layout copied to clipboard

Causes Memory Leak when used in Fragment

Open iampjeetsingh opened this issue 1 year ago • 0 comments

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.

Screenshot

iampjeetsingh avatar May 28 '23 05:05 iampjeetsingh