destroy view after switched