[6.7.0][地图] refactor: 修复 地图内存泄露 问题;
This commit is contained in:
@@ -11,6 +11,7 @@ import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationWGS84Liste
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisStatesListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationWGS84ListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisStatesListenerManager
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager
|
||||
import com.mogo.map.MogoMap
|
||||
import com.mogo.map.MogoMapView
|
||||
import com.mogo.map.overlay.line.Polyline
|
||||
@@ -137,6 +138,10 @@ class MapBizView(context: Context?, attrs: AttributeSet?) : MogoMapView(context,
|
||||
// 先取消注册数据,再onDestroy
|
||||
CallerChassisLocationWGS84ListenerManager.removeListener(TAG)
|
||||
CallerChassisStatesListenerManager.removeListener(TAG)
|
||||
CallerMapUIServiceManager.getOverlayManager()?.let {
|
||||
it.removeAllLines()
|
||||
it.removeAllPoints()
|
||||
}
|
||||
super.onDestroy()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user