Clear the rest controller object after use