Exemplo n.º 1
0
 @Override
 protected void onDestroy() {
   if (mLocClient != null && mLocClient.isStarted()) {
     // 退出时销毁定位
     mLocClient.stop();
   }
   // 关闭定位图层
   mBaiduMap.setMyLocationEnabled(false);
   mMapView.onDestroy();
   mMapView = null;
   // 取消监听 SDK 广播
   unregisterReceiver(mReceiver);
   super.onDestroy();
   // 回收 bitmap 资源
   bdgeo.recycle();
 }
 @Override
 protected void onDestroy() {
   if (locClient != null && locClient.isStarted()) {
     // 退出时销毁定位
     locClient.stop();
   }
   // 关闭定位图层
   baiduMap.setMyLocationEnabled(false);
   mapView.onDestroy();
   mapView = null;
   // 取消监听 SDK 广播
   unregisterReceiver(receiver);
   super.onDestroy();
   // 回收 bitmap 资源
   descriptor.recycle();
 }