Fixed some memory leaks in the Python module
This commit is contained in:
parent
3c83a76e48
commit
4feb983688
2 changed files with 0 additions and 2 deletions
|
|
@ -169,7 +169,6 @@ phase_getarray(PyObject* self, PyObject* args)
|
|||
#ifdef HAS_NUMPY
|
||||
npy_intp nnn = nsp;
|
||||
x = (PyArrayObject*)PyArray_SimpleNew(1, &nnn, PyArray_DOUBLE);
|
||||
Py_INCREF(x);
|
||||
#else
|
||||
int nnn = int(nsp);
|
||||
x = (PyArrayObject*)PyArray_FromDims(1, &nnn, PyArray_DOUBLE);
|
||||
|
|
|
|||
|
|
@ -239,7 +239,6 @@ thermo_getarray(PyObject* self, PyObject* args)
|
|||
npy_intp nnn = xlen;
|
||||
PyArrayObject* x =
|
||||
(PyArrayObject*)PyArray_SimpleNew(1, &nnn, PyArray_DOUBLE);
|
||||
Py_INCREF(x);
|
||||
#else
|
||||
int nnn = int(xlen);
|
||||
PyArrayObject* x =
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue