Release resource before entering gameview.