From e9afe6fc691737b289d524eec727dd5df6291d8b Mon Sep 17 00:00:00 2001 From: Hai Shi Date: Mon, 17 Aug 2020 21:07:07 +0800 Subject: [PATCH] explict gc collect in main interpreter --- Python/pylifecycle.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Python/pylifecycle.c b/Python/pylifecycle.c index 2d219a4a3a8b0d..ab5a6767864dc5 100644 --- a/Python/pylifecycle.c +++ b/Python/pylifecycle.c @@ -1286,10 +1286,8 @@ finalize_interp_clear(PyThreadState *tstate) /* Clear interpreter state and all thread states */ PyInterpreterState_Clear(tstate->interp); - /* Trigger a GC collection on subinterpreters*/ - if (!is_main_interp) { - _PyGC_CollectNoFail(); - } + /* Last explicit GC collection */ + _PyGC_CollectNoFail(); /* Clear all loghooks */ /* Both _PySys_Audit function and users still need PyObject, such as tuple. pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy