From 4feb983688e983693a9fe7333b706cf435fccf24 Mon Sep 17 00:00:00 2001 From: Ray Speth Date: Fri, 23 Mar 2012 22:16:42 +0000 Subject: [PATCH] Fixed some memory leaks in the Python module --- src/python/ctphase_methods.cpp | 1 - src/python/ctthermo_methods.cpp | 1 - 2 files changed, 2 deletions(-) diff --git a/src/python/ctphase_methods.cpp b/src/python/ctphase_methods.cpp index b9d7ee17d..b9d7c975f 100644 --- a/src/python/ctphase_methods.cpp +++ b/src/python/ctphase_methods.cpp @@ -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); diff --git a/src/python/ctthermo_methods.cpp b/src/python/ctthermo_methods.cpp index d1f2bebab..829f787b1 100644 --- a/src/python/ctthermo_methods.cpp +++ b/src/python/ctthermo_methods.cpp @@ -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 =