Saves on close event. Close subviews when closing a view.