Add method to clean up object once garbage collected