File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -490,7 +490,6 @@ instance_dealloc(register PyInstanceObject *inst)
490490#ifdef Py_TRACE_REFS
491491 extern long _Py_RefTotal ;
492492#endif
493- PyObject_GC_Fini (inst );
494493 /* Call the __del__ method if it exists. First temporarily
495494 revive the object and save the current exception, if any. */
496495#ifdef Py_TRACE_REFS
@@ -523,7 +522,6 @@ instance_dealloc(register PyInstanceObject *inst)
523522#ifdef COUNT_ALLOCS
524523 inst -> ob_type -> tp_free -- ;
525524#endif
526- PyObject_GC_Init ((PyObject * )inst );
527525 return ; /* __del__ added a reference; don't delete now */
528526 }
529527#ifdef Py_TRACE_REFS
@@ -535,6 +533,7 @@ instance_dealloc(register PyInstanceObject *inst)
535533 inst -> ob_type = NULL ;
536534#endif
537535#endif /* Py_TRACE_REFS */
536+ PyObject_GC_Fini (inst );
538537 Py_DECREF (inst -> in_class );
539538 Py_XDECREF (inst -> in_dict );
540539 inst = (PyInstanceObject * ) PyObject_AS_GC (inst );
You can’t perform that action at this time.
0 commit comments