This function first calls the function registered with dtobj by dtRegisterCloseFunc(), if there is one. It then removes the trace object from the trace object list, flushes the trace buffer to disk, and frees all storage associated with the object.
void dtClose(dt *dtobj)