private void OnObjectDestroyed(ALayer arg1, AObject arg2) { if (this.mappingObjectToObject2D.ContainsKey(arg2)) { LayerObject2D layer = this.mappingLayerToLayerObject2D[arg1]; AObject2D object2D = this.mappingObjectToObject2D[arg2]; layer.RemoveObject2D(object2D); this.mappingObjectToObject2D.Remove(arg2); } }