Use gc to clean up resources.