Skip to content

Commit 50b8167

Browse files
committed
修复一处引用计数导致的内存泄露
1 parent 55cee19 commit 50b8167

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

modules/data.hpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ static PyObject* ramdom(PyObject* self, PyObject* args) {
88
WORD d2;
99
WORD d3;
1010
WORD d4;
11-
PyObject* ramdom_data = Py_BuildValue("[]");
11+
//PyObject* ramdom_data = Py_BuildValue("[]");
1212
DWORD err = ViKeyRandom(index, &d1, &d2, &d3, &d4);
1313
if (err) {
14-
Py_DECREF(ramdom_data);
14+
//Py_DECREF(ramdom_data);
1515
PyErr_SetObject(PyExc_RuntimeError, Py_BuildValue("k", err));
1616
return NULL;
1717
}

0 commit comments

Comments
 (0)