Message204717
tracemalloc cannot be used in object destructors because the module is stopped early at Python shutdown.
I would like to use tracemalloc.get_object_traceback() in object destructors to retrieve where an object was allocated.
Attached patch replaces the atexit handler with a builtin _PyTraceMalloc_Fini() function to stop tracemalloc much later. It does also simplify the C code of _tracemalloc.c. |
|
Date |
User |
Action |
Args |
2013-11-29 10:57:31 | vstinner | set | recipients:
+ vstinner, pitrou, neologix |
2013-11-29 10:57:31 | vstinner | set | messageid: <1385722651.55.0.86737779548.issue19831@psf.upfronthosting.co.za> |
2013-11-29 10:57:31 | vstinner | link | issue19831 messages |
2013-11-29 10:57:31 | vstinner | create | |
|