N
N
Neonoviiwolf2017-03-27 01:23:11
Java
Neonoviiwolf, 2017-03-27 01:23:11

After each turn, the application starts to slow down more and more, what to do?

Good!
In general, I noticed that the application becomes slower after each turn of the screen. Somewhere after the 10th you can already notice, after 30 it is very noticeable. The memory slowly eats away, which is interesting, if you call the GC, it collects somewhere around 90%, and if you turn it over again, the memory is again eaten up by the cleared 90% + a little more.
I called Dump Jump Heap - the activity does not show leaks, but there are a lot of duplicates of some and their number is growing.
I think it's a mistake that the application does not get rid of the fragments and continues to multiply and collect them after each rotation. Is it possible to somehow kill them through the FragmentManager, can you even kill them all at once? Those. not via replace. Because I have a fragment within a fragment

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Andrey Myvrenik, 2017-03-27
@Neonoviiwolf

Install LeakCanary and add all fragments to RefWatcher according to instructions . You will see all the leaks and what caused them. The reasons may be different.

A
aol-nnov, 2017-03-27
@aol-nnov

> how to be?
do not turn!!1
on the case: google://andoid activity lifecycle

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question