Commit 8503f752 authored by James Bowman's avatar James Bowman

Fixed leak of dims in MatND creates

parent 06b06d5f
......@@ -2793,6 +2793,7 @@ static PyObject *pycvCreateMatNDHeader(PyObject *self, PyObject *args)
m->data = Py_None;
Py_INCREF(m->data);
delete [] dims.i;
return (PyObject*)m;
}
......@@ -2806,6 +2807,7 @@ static PyObject *pycvCreateMatND(PyObject *self, PyObject *args)
return NULL;
cvmatnd_t *m = PyObject_NEW(cvmatnd_t, &cvmatnd_Type);
ERRWRAP(m->a = cvCreateMatND(dims.count, dims.i, type));
delete [] dims.i;
return pythonize_CvMatND(m);
}
......
......@@ -6,5 +6,5 @@ while True:
for i in range(4000):
a = cv.CreateImage((1024,1024), cv.IPL_DEPTH_8U, 1)
b = cv.CreateMat(1024, 1024, cv.CV_8UC1)
# c = cv.CreateMatND([1024,1024], cv.CV_8UC1)
c = cv.CreateMatND([1024,1024], cv.CV_8UC1)
print "pause..."
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment