bugfix: #138,内存泄漏问题
This commit is contained in:
@@ -103,6 +103,10 @@ class SnapshotSetDataDrawer extends BaseDrawer implements IMogoMarkerClickListen
|
||||
mCloudSnapshotMarkersCaches.clear();
|
||||
} catch ( Exception e ) {
|
||||
}
|
||||
clearTargetTypeMarkers();
|
||||
}
|
||||
|
||||
private void clearTargetTypeMarkers() {
|
||||
try {
|
||||
MogoApisHandler.getInstance().getApis()
|
||||
.getMapServiceApi().getMarkerManager( mContext )
|
||||
@@ -118,14 +122,16 @@ class SnapshotSetDataDrawer extends BaseDrawer implements IMogoMarkerClickListen
|
||||
*/
|
||||
public void renderSnapshotData( MogoSnapshotSetData data,
|
||||
boolean machineVision ) {
|
||||
recordTimeFlag();
|
||||
if ( !MogoApisHandler.getInstance().getApis().getStatusManagerApi().isMainPageLaunched() ) {
|
||||
if ( !mCloudSnapshotMarkersCaches.isEmpty() ) {
|
||||
clearOldStyleMarkers();
|
||||
}
|
||||
return;
|
||||
}
|
||||
if ( data == null || (
|
||||
( data.getAllList() == null || data.getAllList().isEmpty() ) &&
|
||||
( data.getNearList() == null || data.getNearList().isEmpty() ) ) ) {
|
||||
MogoApisHandler.getInstance().getApis().getMapServiceApi().getMarkerManager( AbsMogoApplication.getApp() ).removeMarkers( DataTypes.TYPE_MARKER_CLOUD_DATA );
|
||||
clearOldStyleMarkers();
|
||||
return;
|
||||
}
|
||||
List< CloudRoadData > allDatumsList = new ArrayList<>();
|
||||
@@ -220,21 +226,6 @@ class SnapshotSetDataDrawer extends BaseDrawer implements IMogoMarkerClickListen
|
||||
purgeCloudSnapshotData( out );
|
||||
}
|
||||
|
||||
/**
|
||||
* 记录时间
|
||||
*/
|
||||
private void recordTimeFlag() {
|
||||
// if ( mLastReceiveTime != 0 ) {
|
||||
// mAnimationDuration = System.currentTimeMillis() - mLastReceiveTime;
|
||||
// if ( mAnimationDuration > 1000L ) {
|
||||
// mAnimationDuration = 500L;
|
||||
// }
|
||||
// } else {
|
||||
// mAnimationDuration = 500L;
|
||||
// }
|
||||
// mLastReceiveTime = System.currentTimeMillis();
|
||||
}
|
||||
|
||||
/**
|
||||
* vr 模式下显示合并数据,否则只显示上报位置的车辆
|
||||
*
|
||||
|
||||
@@ -272,6 +272,8 @@ public class EntranceViewHolder {
|
||||
|
||||
public void release(){
|
||||
rootViewGroup = null;
|
||||
featureViewGroup = null;
|
||||
leftNoticeContainer = null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -473,6 +473,7 @@ public class TopViewAnimHelper {
|
||||
topMotionLayout = null;
|
||||
topContainer = null;
|
||||
cameraMode = null;
|
||||
animNavInfoView = null;
|
||||
}
|
||||
|
||||
public void enterVrMode() {
|
||||
|
||||
@@ -359,6 +359,7 @@ public class MainActivity extends MvpActivity< MainView, MainPresenter > impleme
|
||||
mServiceApis.getMapServiceApi().getHostListenerRegister().unregisterHostAimlessModeListener();
|
||||
mServiceApis.getMapServiceApi().getHostListenerRegister().unregisterHostNaviListener();
|
||||
mServiceApis.getMapServiceApi().getHostListenerRegister().unregisterHostMapListener();
|
||||
mServiceApis.getRegisterCenterApi().unregisterADASControlStatusChangedListener( TAG );
|
||||
mMogoStatusManager.setMainPageLaunchedStatus( TAG, false );
|
||||
mMogoStatusManager.setMainPageIsBackgroundStatus( TAG, false );
|
||||
mMogoFragmentManager.unregisterMainFragmentStackTransactionListener();
|
||||
|
||||
@@ -154,7 +154,6 @@ public class SkinCompatManager extends SkinObservable {
|
||||
|
||||
public static void destroy(){
|
||||
sInstance.onDestroy();
|
||||
sInstance = null;
|
||||
}
|
||||
|
||||
public void onDestroy(){
|
||||
|
||||
Reference in New Issue
Block a user