arraylist - android google map activity open more than two times , than out of memory error issue came -


here, using google map v2 api draw multiple path(using polyline) on google map.

note : when click button start new google map activity class , draw path on first time successfully.then, click button , again start same map activity class , draw multiple path.

then, same thing, click button , start same map activity means , out of memory error coming.

error output..

04-01 03:12:46.165: e/androidruntime(7803): fatal exception: main 04-01 03:12:46.165: e/androidruntime(7803): java.lang.outofmemoryerror 04-01 03:12:46.165: e/androidruntime(7803):     @ java.util.arraylist.add(arraylist.java:118) 04-01 03:12:46.165: e/androidruntime(7803):     @ com.google.android.gms.maps.model.polylineoptions.add(unknown source) 04-01 03:12:46.165: e/androidruntime(7803):     @ com.trucklogics.usercontroller.userorderlistmapview.drawdirection(userorderlistmapview.java:483) 04-01 03:12:46.165: e/androidruntime(7803):     @ com.trucklogics.usercontroller.userorderlistmapview.access$1(userorderlistmapview.java:453) 04-01 03:12:46.165: e/androidruntime(7803):     @ com.trucklogics.usercontroller.userorderlistmapview$getroutetask$1.run(userorderlistmapview.java:228) 04-01 03:12:46.165: e/androidruntime(7803):     @ android.app.activity.runonuithread(activity.java:4673) 04-01 03:12:46.165: e/androidruntime(7803):     @ com.trucklogics.usercontroller.userorderlistmapview$getroutetask.onpostexecute(userorderlistmapview.java:225) 04-01 03:12:46.165: e/androidruntime(7803):     @ com.trucklogics.usercontroller.userorderlistmapview$getroutetask.onpostexecute(userorderlistmapview.java:1) 04-01 03:12:46.165: e/androidruntime(7803):     @ android.os.asynctask.finish(asynctask.java:631) 04-01 03:12:46.165: e/androidruntime(7803):     @ android.os.asynctask.access$600(asynctask.java:177) 04-01 03:12:46.165: e/androidruntime(7803):     @ android.os.asynctask$internalhandler.handlemessage(asynctask.java:644) 04-01 03:12:46.165: e/androidruntime(7803):     @ android.os.handler.dispatchmessage(handler.java:99) 04-01 03:12:46.165: e/androidruntime(7803):     @ android.os.looper.loop(looper.java:137) 04-01 03:12:46.165: e/androidruntime(7803):     @ android.app.activitythread.main(activitythread.java:5103) 04-01 03:12:46.165: e/androidruntime(7803):     @ java.lang.reflect.method.invokenative(native method) 04-01 03:12:46.165: e/androidruntime(7803):     @ java.lang.reflect.method.invoke(method.java:525) 04-01 03:12:46.165: e/androidruntime(7803):     @ com.android.internal.os.zygoteinit$methodandargscaller.run(zygoteinit.java:737) 04-01 03:12:46.165: e/androidruntime(7803):     @ com.android.internal.os.zygoteinit.main(zygoteinit.java:553) 04-01 03:12:46.165: e/androidruntime(7803):     @ dalvik.system.nativestart.main(native method) 

expected output :

when start new activity, how clear previous activity used memory.. how clear cache memory while jumping activity..

try android:largeheap="true" in manifest's application tag


Comments

Popular posts from this blog

javascript - AngularJS custom datepicker directive -

javascript - jQuery date picker - Disable dates after the selection from the first date picker -