[Code]优化代码逻辑
This commit is contained in:
@@ -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 );
|
||||
|
||||
Reference in New Issue
Block a user