Release the resources at the end of execution