EvanRespaut / Equate

Unit converting calculator
GNU General Public License v3.0
67 stars 17 forks source link

Memory Leak #29

Open Robigus92 opened 6 years ago

Robigus92 commented 6 years ago

After a double background-foreground event of the CalcActivity there are in heap memory more instances of:

class com.llamacorp.equate.view.ConvertButton @ 0x12e4f000 class com.llamacorp.equate.view.ConvKeysFragment$2 @ 0x12dfed00 class com.llamacorp.equate.view.ConvKeysFragment @ 0x12c8d400 class com.llamacorp.equate.view.ConvKeysFragment$1 @ 0x12dfec40 class com.llamacorp.equate.view.ConvKeysFragment$3 @ 0x12dfedc0

It should not be like this because the background-foreground events return to the same GUI state and the memory should stay in the same state as well. It could be a symptom of a bad management of the onStart-onStop lifecycle.

I have encountered this problem on an Android emulator running 7.1.1 os version.

Robigus92 commented 6 years ago

I have found another problem


After a double pop-up event (e.g. a dialog that covers partially the activity) of the CalcActivity there are in heap memory more instances of:

class com.llamacorp.equate.view.ConvKeysFragment$1 @ 0x12e1ac40 class com.llamacorp.equate.view.ConvKeysFragment$2 @ 0x12e1ad00 class com.llamacorp.equate.view.ConvKeysFragment$3 @ 0x12e1adc0 class com.llamacorp.equate.view.ConvertButton @ 0x12e62000 class com.llamacorp.equate.view.ConvKeysFragment @ 0x12ca1400

It should not be like this because the pop-up events return to the same GUI state and the memory should stay in the same state as well. It could be a symptom of a bad management of the onPause-onResume lifecycle.

I have encountered this problem on an Android emulator running 7.1.1 os version.

EvanRespaut commented 6 years ago

Good find. I've been fighting that fragment for a while. I'll look into this for next release.

EvanRespaut commented 6 years ago

Good find. I've been fighting that fragment for a while. I'll look into this for next release.