After every turn, the application starts to slow down more and more, what should I do?

  • 0
    In general, I noticed that the application becomes slower after each screen rotation. Somewhere after 10, you can already notice, after 30 it is very noticeable. The memory slowly eats away, which is interesting, if you call GC, it collects somewhere around 90%, and if you turn it over again, then the memory is again eaten for 90% cleaned + a little more.
    Called Dump Jump Heap - activity does not show leaks, but there are a lot of duplicates of some kind and their number is growing.
    I guess the cant is that the app doesn't get rid of the fragments and continues to multiply and collect them after each turn. Is it possible to kill them somehow through the FragmentManager, can we sell all of them at once? Those. not through replace. Because I have a fragment in a fragment
    Android Anonymous, Apr 12, 2020

  • 2 Answers
  • 0
    Install LeakCanary and add all snippets to RefWatcher by instructions . You will see all the leaks and what caused them. The reasons may vary.

  • 0
    & gt; what to do?

    do not turn !! 1

    on the case: google: // andoid activity lifecycle

Your Answer
To place the code, please use CodePen or similar tool. Thanks you!