Fix memory leaks from incomplete destructors.