Public Sub Heap_stats
Dim r As Reflector
r.Target = r.RunStaticMethod("java.lang.Runtime", "getRuntime", Null, Null)
Log("Maximum Allocated Memory = " & NumberFormat2(r.RunMethod("maxMemory")/(1024*1024), 1, 4, 4, False) & " MB")
Log("Current Allocated Memory = " & NumberFormat2(r.RunMethod("totalMemory")/(1024*1024), 1, 4, 4, False) & " MB")
Log("Unused Allocated Memory = " & NumberFormat2(r.RunMethod("freeMemory")/(1024*1024), 1, 4, 4, False) & " MB")
Log(".: Used Allocated Memory = " & NumberFormat2((r.RunMethod("totalMemory") - r.RunMethod("freeMemory"))/(1024*1024), 1, 4, 4, False) & " MB")
Log(" ")
End Sub
SetApplicationAttribute(android:largeHeap,"true")
This is probably the problem. What exactly are you doing?do the bitmap activity a couple of times
I was afraid you would ask this - it is difficult to explain without giving an essay on what the app will do when finished.What exactly are you doing?
Erel,Try to call Map.Clear in Activity_Pause (assuming that the Ready event has fired).
http://stackoverflow.com/questions/...fragment-memory-leak#comment20254946_14523949
If you are using Google Map API, maybe consider going back to accessing Google Maps with http+webview.
Complicated and custom Google Map app (not using API) can switch in and out of context reasonably quick.