ViewInstanceEntity instanceDefinition = instanceDefinitions.get(instanceName);
if (instanceDefinition != null) {
View view = definition.getView();
if (view != null) {
view.onDestroy(instanceDefinition);
}
instanceDefinitions.remove(instanceName);
}
}
}