[GraphHopper] Android: Unload graph
Peter K
peathal at yahoo.de
Sun Apr 27 14:40:40 UTC 2014
Hey Emux,
yes graph and locationIndex don't get null but they are lightweight and
no longer usable. But I'll check if proper exceptions are thrown if they
are still used. Maybe a better solution for Android can be:
onDestroy(...) { // as you suggested
hopper.close()
// include the following, so that a new instance has to be created for
a new onCreate call:
hopper=null
System.gc()
}
Regards,
Peter.
> Peter is there a way to check if GH has a graph loaded?
>
> I see methods like getGraphHopperLocation, getGraph, getLocationIndex
> but I think that their values do not get null with GH.close().
> e.g. the 'fullyLoaded' variable is hidden
>
> --
> Emux
> Cruiser <http://wiki.openstreetmap.org/wiki/Cruiser> - Atlas
> <http://wiki.openstreetmap.org/wiki/Atlas_%28navigation_application%29>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/graphhopper/attachments/20140427/da3ed40e/attachment.html>
More information about the GraphHopper
mailing list