Hi everyone, I am integrating Graphhopper routing function to my application. The Android demo program is used as an activity, and it's switched back and forth with other activities. The map routing function is working fine except crashes due to "Out of memory" exceptions. The problem happened in the function loadMap() of the demo program when the activity is second or third time restarted. I guess it's caused by memory leaking, but I don't know what resources need to be released when the activity is finished. An example of the LogCat messages is captured. Can Anybody Help Me?
Regards, John L. ... ... 02-19 13:03:11.400: I/dalvikvm-heap(31512): Forcing collection of SoftReferences for 2359312-byte allocation 02-19 13:03:11.440: I/dalvikvm-heap(31512): Clamp target GC heap from 136.356MB to 128.000MB 02-19 13:03:11.440: D/dalvikvm(31512): GC_BEFORE_OOM freed 78K, 8% free 121253K/130532K, paused 38ms, total 38ms 02-19 13:03:11.440: E/dalvikvm-heap(31512): Out of memory on a 2359312-byte allocation. 02-19 13:03:11.440: I/dalvikvm(31512): "MapWorker" prio=3 tid=20 RUNNABLE 02-19 13:03:11.440: I/dalvikvm(31512): | group="main" sCount=0 dsCount=0 obj=0x46b7c8e8 self=0x7b48f510 02-19 13:03:11.440: I/dalvikvm(31512): | sysTid=31613 nice=13 sched=0/0 cgrp=apps/bg_non_interactive handle=2009107872 ... ... _______________________________________________ GraphHopper mailing list [email protected] https://lists.openstreetmap.org/listinfo/graphhopper
