}
}
structure.views.remove(view);
//System.out.println("Destroy view finished");
structure.dhns.writeUnlock();
structure.dhns.getEventManager().fireEvent(new ViewEvent(EventType.DESTROY_VIEW, view));
if (structure.visibleView == view) {
structure.visibleView = structure.mainView;
structure.dhns.getEventManager().fireEvent(new ViewEvent(EventType.VISIBLE_VIEW, structure.mainView));
}
}