Move destructor to cpp.