Re: [Numpy-discussion] Solving a memory leak in a numpy extension; PyArray_ContiguousFromObject

2009-04-20 Thread Dan S
2009/4/20 "V. Armando Solé" : > Dan S wrote: >> But as you can see, my C code doesn't perform any malloc() or >> suchlike, so I'm stumped. >> >> I'd be grateful for any further thoughts > Could it be your memory leak is in: > > ret

Re: [Numpy-discussion] Solving a memory leak in a numpy extension; PyArray_ContiguousFromObject

2009-04-20 Thread Dan S
Thanks all for responses. Continuation below: 2009/4/18 Charles R Harris : > > > On Fri, Apr 17, 2009 at 9:25 AM, Dan S wrote: >> >> Hi - >> >> I have written a numpy extension which works fine but has a memory >> leak. It takes a single array argumen

[Numpy-discussion] Solving a memory leak in a numpy extension; PyArray_ContiguousFromObject

2009-04-17 Thread Dan S
Hi - I have written a numpy extension which works fine but has a memory leak. It takes a single array argument and returns a single scalar. After reducing the code down in order to chase the problem, I have the following: static PyObject * kdpee_pycall(PyObject *self, PyObject *args) { Py