Reputation: 295
i`m facing this memory leak after closing my activity by pressing back-button:
Since i couldnt figure out what it is, i outcommented almost my whole code to:
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
protected void onPause()
{
super.onPause();
}
protected void onDestroy()
{
super.onDestroy();
}
I guess it has something to do with AudioManager. But since i outcommented anything i dont have a clue what it could be.
Any advice?
Update: I`m facing the same "issue" while making a heap dump on a hello-world app, created by android studio.....so i guess its somehow normal. But whats the explanation for this?
Upvotes: 0
Views: 774
Reputation: 11537
Even you are not using AudioManager
, it might leak as some of the buttons in your UI might yield a click sound. For some reason, it might or might not leak.
A working solution for me was to use the workaround that can be found on github. Further discussion is available here: Android Context Memory Leak ListView due to AudioManager
Upvotes: 1