Skip to content

Commit

Permalink
pythongh-128679: Clear the ref trace in _PyTraceMalloc_Stop()
Browse files Browse the repository at this point in the history
_PyTraceMalloc_Stop() now calls PyRefTracer_SetTracer(NULL, NULL).
  • Loading branch information
vstinner committed Jan 24, 2025
1 parent eed7865 commit 14e2553
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Python/tracemalloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -986,6 +986,8 @@ _PyTraceMalloc_Stop(void)
raw_free(tracemalloc_traceback);
tracemalloc_traceback = NULL;

(void)PyRefTracer_SetTracer(NULL, NULL);

done:
TABLES_UNLOCK();
}
Expand Down

0 comments on commit 14e2553

Please sign in to comment.