Skip to content

Commit 85fab3b

Browse files
committed
reinstate collection assert on shutdown from Python
1 parent 0325a8c commit 85fab3b

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/runtime/runtime.cs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -326,12 +326,9 @@ internal static void Shutdown(ShutdownMode mode)
326326
DisposeLazyModule(inspect);
327327
PyObjectConversions.Reset();
328328

329-
if (mode != ShutdownMode.Extension)
330-
{
331-
PyGC_Collect();
332-
bool everythingSeemsCollected = TryCollectingGarbage();
333-
Debug.Assert(everythingSeemsCollected);
334-
}
329+
PyGC_Collect();
330+
bool everythingSeemsCollected = TryCollectingGarbage();
331+
Debug.Assert(everythingSeemsCollected);
335332

336333
Finalizer.Shutdown();
337334
InternString.Shutdown();

0 commit comments

Comments
 (0)