Added codes for destructions of objects