trim memory tracking clean up