File tree Expand file tree Collapse file tree 2 files changed +1
-4
lines changed Expand file tree Collapse file tree 2 files changed +1
-4
lines changed Original file line number Diff line number Diff line change @@ -96,8 +96,6 @@ internal PyObject(in StolenReference reference)
96
96
// when the managed wrapper is garbage-collected.
97
97
~ PyObject ( )
98
98
{
99
- Debug . Assert ( obj != IntPtr . Zero || this . GetType ( ) != typeof ( PyObject ) ) ;
100
-
101
99
if ( obj != IntPtr . Zero )
102
100
{
103
101
Original file line number Diff line number Diff line change @@ -379,14 +379,13 @@ internal static void Shutdown(ShutdownMode mode)
379
379
DisposeLazyModule ( inspect ) ;
380
380
PyObjectConversions . Reset ( ) ;
381
381
382
+ PyGC_Collect ( ) ;
382
383
bool everythingSeemsCollected = TryCollectingGarbage ( ) ;
383
- Debug . Assert ( everythingSeemsCollected ) ;
384
384
Finalizer . Shutdown ( ) ;
385
385
InternString . Shutdown ( ) ;
386
386
387
387
if ( mode != ShutdownMode . Normal && mode != ShutdownMode . Extension )
388
388
{
389
- PyGC_Collect ( ) ;
390
389
if ( mode == ShutdownMode . Soft )
391
390
{
392
391
RuntimeState . Restore ( ) ;
You can’t perform that action at this time.
0 commit comments