图层损坏 E/ArcGIS﹕ The map or layer has been destroyed or recycled. 资源未释放
来源:互联网 发布:2016淘宝小号批量注册 编辑:程序博客网 时间:2024/06/04 23:19
看到论坛上有个网友和我一样的问题:
The map or layer has been destroyed or recyled
-------------------------------------------------------------------------------------------------------我这边的详细问题是:
地图的Activity onDestroy()后,在重新打开app的时候就报 The map or layer has been destroyed or recycled.错误,然后地图能显示
但是数据丢了..
原来的destroy()
@Overrideprotected void onDestroy() {featureLayers.clear();mMapView.destroyDrawingCache();try {unregisterReceiver(receiver);}catch (Exception e){e.printStackTrace();}try {unregisterReceiver(receiver2);}catch (Exception e){e.printStackTrace();}//结束服务,如果想让服务一直运行就注销此句try {stopService(new Intent(this, LocationService.class));}catch (Exception e){e.printStackTrace();}super.onDestroy();}
//初始化数据图层private void initializeRoutingAndGeocoding() {for(int i=0;i<allfloor;i++) {Geodatabase geodatabase = null;try {geodatabase = new Geodatabase(geofilename[i]);List<GeodatabaseFeatureTable> table = geodatabase.getGeodatabaseTables();Log.i("zjx", "list:" + table);GeodatabaseFeatureTable mytable;if(i==1)mytable = geodatabase.getGeodatabaseFeatureTableByLayerId(0);else mytable= geodatabase.getGeodatabaseFeatureTableByLayerId(1);Log.i("zjx","mytable:"+mytable);featureLayers.add(new FeatureLayer(mytable)); //问题出在这// Attempt to load the local geocoding and routing datamMapView.addLayer(featureLayers.get(i)); //之前的资源没有释放(list.clear()),get(i)并不是新增的} catch (FileNotFoundException e) {// TODO Auto-generated catch blocke.printStackTrace();}}trygetDataName();}所以在onDestroy 里面加一下释放所有资源的函数,以前一直以为java会自己快速回收的= =
,
esri论坛sso不能登录,希望那个外国网友能看到这文章把~
0 0
- 图层损坏 E/ArcGIS﹕ The map or layer has been destroyed or recycled. 资源未释放
- 错误:Activity has been destroyed
- Handler出现:The specified message queue synchronization barrier token has not been posted or has alre
- The certificate used to sign "bundle id 名字" has either expired or has been revoked
- iOS真机调试问题The certificate has either expired or has been revoked
- The certificate used to sign "XXX" has either expired or has been revoked
- IOS APP发布-The certificate used to sign "XXX" has either expired or has been revoked
- [iOS 问题解决]The certificate used to sign "ShowMe_iOS" has either expired or has been revoked.
- The certificate used to sign "XXX" has either expired or has been revoked
- The certificate used to sign "xxx" has either expired or has been revoked. An updated certifica
- The certificate used to sign "XXX" has either expired or has been revoked
- Xcode Error " The certificate used to sign "XXX" has either expired or has been revoked"
- 问题:The certificate used to sign "XXX" has either expired or has been revoked
- The certificate used to sign "" has either expired or has been revoked.
- The certificate used to sign "bundle id 名字" has either expired or has been revoked
- Error: The project file ' ' has been renamed or is no longer in the solution
- VS2010 The project file ' ' has been renamed or is no longer in the solution
- the project file '' has been renamed or is no longer in the solution 解决办法
- VB.net工程的引用修改问题
- 偷西瓜(SPFA运用链式前向星来记录路径+删除路径+求最短路和次短路)
- Linux性能监控工具sysstat系列:介绍与安装
- URAL 2026 C - Dean and Schedule
- 每一个优秀的人,都有一段沉默的时光,是那一段时光,不抱怨不诉苦,最后渡过了这段感动自己的日子
- 图层损坏 E/ArcGIS﹕ The map or layer has been destroyed or recycled. 资源未释放
- 猴子
- 黑马程序员-多线程基础知识1
- Java之克隆
- vector培训
- 朴素贝叶斯分类算法(Naive Bayesian classification)
- hihoCoder 1066 无间道之并查集
- 堆和栈的区别
- 黑马程序员——集合