In my mainActivity I declare static List like this:
public static List<Map<String, String>> ArrList = new ArrayList<Map<String, String>>();
Then in other activities I access this list with mainActivity.ArrList ... I am almost sure that I am not supposed to do this, but anyway, I would like to understand all of it a little bit better...
So, here are my questions: 1) As far as I know, due to low memory or something, my mainActivity could get destroyed (while another activity is in focus) and in that case my ArrList would get destroyed too. Is that right? 2) Whene I exit, then restart, my app crashes and debugger reports OutOfMemory. I assume upon restart android allocates another block of memory for my static List. So, I also assume that I should destroy static List when Activity ends. How to do that properly?
I appreciate any other advice about this matter.