How to release the resources of a MapView?

2606
2
11-23-2012 07:58 PM
zlei
by
New Contributor
We use MapView.addLayer() to load a map. It seems that after the MapView is deleted, there are almost 10M memory leak on the Android platform.

We tried the SwitchMapActivities sample, the result is the same.

Kindly please tell us how to release the resource of MapView on Android platform?  Thanks in advance.
0 Kudos
2 Replies
DanO_Neill
Occasional Contributor III
Either set the MapView to null or call the MapView.recycle() method.
0 Kudos
zlei
by
New Contributor
We've tried to call MapView.recycle() method and set MapView to null. Furthermore we tried to call MapView.finalize(), but it didn't work.

Kindly please run the SwitchMapActivities sample in your environment and confirm whether it leaks.

Please give feedback to us. Many thanks.
0 Kudos