MCPcopy Create free account
hub / github.com/fabioz/PyDev.Debugger / DecRef

Function DecRef

pydevd_attach_to_process/common/ref_utils.hpp:13–19  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11}
12
13void DecRef(PyObject* object, bool isDebug) {
14 auto noDebug = GetPyObjectPointerNoDebugInfo(isDebug, object);
15
16 if (noDebug != nullptr && --noDebug->ob_refcnt == 0) {
17 ((PyTypeObject*)GetPyObjectPointerNoDebugInfo(isDebug, noDebug->ob_type))->tp_dealloc(object);
18 }
19}
20
21void IncRef(PyObject* object) {
22 object->ob_refcnt++;

Calls 1

Tested by

no test coverage detected