This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients neologix, pitrou, vstinner
Date 2013-11-29.10:57:29
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1385722651.55.0.86737779548.issue19831@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2013-11-29 10:57:31vstinnersetrecipients: + vstinner, pitrou, neologix
2013-11-29 10:57:31vstinnersetmessageid: <1385722651.55.0.86737779548.issue19831@psf.upfronthosting.co.za>
2013-11-29 10:57:31vstinnerlinkissue19831 messages
2013-11-29 10:57:31vstinnercreate