Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 91e7a0b

Browse files
Also count UNREF's as freeing an object (only relevant when
COUNT_ALLOCS is defined).
1 parent 8f7871e commit 91e7a0b

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Include/object.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,11 +295,12 @@ environment the global variable trick is not safe.)
295295
#ifndef Py_TRACE_REFS
296296
#ifdef COUNT_ALLOCS
297297
#define _Py_Dealloc(op) ((op)->ob_type->tp_free++, (*(op)->ob_type->tp_dealloc)((PyObject *)(op)))
298+
#define _Py_ForgetReference(op) ((op)->ob_type->tp_free++)
298299
#else
299300
#define _Py_Dealloc(op) (*(op)->ob_type->tp_dealloc)((PyObject *)(op))
300-
#endif
301301
#define _Py_ForgetReference(op) /*empty*/
302302
#endif
303+
#endif
303304

304305
#ifdef COUNT_ALLOCS
305306
extern void inc_count Py_PROTO((PyTypeObject *));

0 commit comments

Comments
 (0)