Closed
Description
Feature or enhancement
Proposal:
This suggestion arose from there not currently being a way in python to test for PyRefTracer_DESTROY
events (that I could find), specifically from there not being a way to add a regression test for: #130382
Add some simple code to tracemalloc
to count PyRefTracer_CREATE
and PyRefTracer_DESTROY
events.
tracemalloc.start()
tracemalloc.clear_traces()
i = []
del i
refs = tracemalloc.get_traced_refs()
print(refs) # will print (1, 1)
tracemalloc.stop()
Has this already been discussed elsewhere?
This is a minor feature, which does not need previous discussion elsewhere
Links to previous discussion of this feature:
No response