Commit 9776adf5 authored by Guido van Rossum's avatar Guido van Rossum

rearranged code in debugging version of DELREF to avoid touching data

after it has been freed.
parent c6cf1dd3
......@@ -406,12 +406,13 @@ UNREF(op)
DELREF(op)
object *op;
{
destructor dealloc = op->ob_type->tp_dealloc;
UNREF(op);
#ifdef COUNT_ALLOCS
op->ob_type->tp_free++;
#endif
(*(op)->ob_type->tp_dealloc)(op);
op->ob_type = NULL;
(*dealloc)(op);
}
printrefs(fp)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment