[Code]优化代码逻辑

This commit is contained in:
renwj
2022-11-04 14:05:36 +08:00
parent 453e0f2773
commit 4cb74d799f

View File

@@ -73,11 +73,11 @@ public class AMapMarkerWrapper implements IMogoMarker, Observer {
@Override
public void destroy() {
if ( mMogoMarkerOptions != null ) {
mMogoMarkerOptions.deleteObservers();
mMogoMarkerOptions = null;
}
synchronized (this) {
if ( mMogoMarkerOptions != null ) {
mMogoMarkerOptions.deleteObservers();
mMogoMarkerOptions = null;
}
if ( mMarker != null ) {
mMarker.remove();
mMarker.setMObject( null );