add destroy override method to free all the variables and objects