mirror of
https://github.com/worldforge/cyphesis
synced 2026-08-13 12:26:04 -04:00
Add checking the stats scripts get decreffed
This commit is contained in:
parent
0f2ce388b9
commit
e79fcc11d5
1 changed files with 4 additions and 0 deletions
|
|
@ -22,6 +22,7 @@
|
|||
#include "PythonArithmeticScript.h"
|
||||
|
||||
#include "common/log.h"
|
||||
#include "common/compose.hpp"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
|
|
@ -35,6 +36,9 @@ PythonArithmeticScript::PythonArithmeticScript(PyObject * script) :
|
|||
|
||||
PythonArithmeticScript::~PythonArithmeticScript()
|
||||
{
|
||||
if (m_script->ob_refcnt != 1) {
|
||||
log(WARNING, String::compose("Deleting arithmetic script with %1 > 1 refs to its script", m_script->ob_refcnt));
|
||||
}
|
||||
Py_DECREF(m_script);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue