Mercurial > cpython-lru_cache-weakref
comparison Python/pythonrun.c @ 83650:f0833e6ff2d2
Issue #1545463: Global variables caught in reference cycles are now garbage-collected at shutdown.
| author | Antoine Pitrou <solipsis@pitrou.net> |
|---|---|
| date | Mon, 06 May 2013 21:15:57 +0200 |
| parents | 6f4627a65c0a |
| children | 213d6d7f5979 |
comparison
equal
deleted
inserted
replaced
| 83649:6d971b172389 | 83650:f0833e6ff2d2 |
|---|---|
| 542 each collection might release some types from the type | 542 each collection might release some types from the type |
| 543 list, so they become garbage. */ | 543 list, so they become garbage. */ |
| 544 while (PyGC_Collect() > 0) | 544 while (PyGC_Collect() > 0) |
| 545 /* nothing */; | 545 /* nothing */; |
| 546 #endif | 546 #endif |
| 547 /* We run this while most interpreter state is still alive, so that | |
| 548 debug information can be printed out */ | |
| 549 _PyGC_Fini(); | |
| 550 | |
| 551 /* Destroy all modules */ | 547 /* Destroy all modules */ |
| 552 PyImport_Cleanup(); | 548 PyImport_Cleanup(); |
| 553 | 549 |
| 554 /* Flush stdout+stderr (again, in case more was printed) */ | 550 /* Flush stdout+stderr (again, in case more was printed) */ |
| 555 flush_std_files(); | 551 flush_std_files(); |
| 626 PyByteArray_Fini(); | 622 PyByteArray_Fini(); |
| 627 PyLong_Fini(); | 623 PyLong_Fini(); |
| 628 PyFloat_Fini(); | 624 PyFloat_Fini(); |
| 629 PyDict_Fini(); | 625 PyDict_Fini(); |
| 630 PySlice_Fini(); | 626 PySlice_Fini(); |
| 627 _PyGC_Fini(); | |
| 631 | 628 |
| 632 /* Cleanup Unicode implementation */ | 629 /* Cleanup Unicode implementation */ |
| 633 _PyUnicode_Fini(); | 630 _PyUnicode_Fini(); |
| 634 | 631 |
| 635 /* Delete current thread. After this, many C API calls become crashy. */ | 632 /* Delete current thread. After this, many C API calls become crashy. */ |
