dtor_ptr in tools.h