I have a piece of C++ code with python-C++ interface that need to be called repeatedly with a python list as its input. I found even the dummy process as following leads to memory leak:
In python:
a = [1.0]*1000
for c in range(1000):
dummy(a, 1)
In C++:
static PyObject* dummy(PyObject* self, PyObject* args) {
Py_RETURN_NONE;
}
Am I miss anything here so it introduces memory leak?