[Python-Dev] del and tp_dealloc in the IO lib (original) (raw)
Antoine Pitrou solipsis at pitrou.net
Fri Jan 23 13:33:14 CET 2009
- Previous message: [Python-Dev] __del__ and tp_dealloc in the IO lib
- Next message: [Python-Dev] __del__ and tp_dealloc in the IO lib
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Giovanni Bajo <rasky develer.com> writes:
The fact that file objects are collected and closed immediately in all reasonable use cases (and even in case of exceptions, that you mention, things get even better with the new semantic of the except clause)
The new except clause removes any external references to the exception, but there's still, AFAIR, the reference cycle through the traceback object, which means the whole thing will still have to wait for a pass of the cyclic garbage collector.
Regards
Antoine.
- Previous message: [Python-Dev] __del__ and tp_dealloc in the IO lib
- Next message: [Python-Dev] __del__ and tp_dealloc in the IO lib
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]