Memory leak in fragments : activity in ActivityThread$ActivityClientRecord

26 Views Asked by At

I have a SingleInstance activity and having 5 fragments. User can switch between fragments. While switching Android Studio profiler reporting memory leaks as shown in screenshot.

enter image description here

Note : I can't finish my activity by finish() method because it's my parent activity. And whenever a button click happen I open it with -

intentSetting.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);

So this calls my activity's onDestroy() and onCreate().

I have 5 fragments and I have same memory leak for all of the fragments. Please help if someone encountered such issue.

0

There are 0 best solutions below