Free up objects and free memory on process termination.