From 95c1a194fab27d5f1e67776632f2d555af6a8c07 Mon Sep 17 00:00:00 2001 From: "J.A. de Jong - Redu-Sone B.V., ASCEE V.O.F" Date: Tue, 17 May 2022 14:58:12 +0200 Subject: [PATCH] Removed bug of double free corruption that was an attempt to fix memory leak --- lasp/c/lasp_pyarray.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lasp/c/lasp_pyarray.h b/lasp/c/lasp_pyarray.h index 90c9205..736463c 100644 --- a/lasp/c/lasp_pyarray.h +++ b/lasp/c/lasp_pyarray.h @@ -87,12 +87,12 @@ static inline PyObject *data_to_ndarray(void *data, int n_rows, int n_cols, // https://stackoverflow.com/questions/54269956/crash-of-jupyter-due-to-the-use-of-pyarray-enableflags/54278170#54278170 // Note that in general it was disadvised to build all C code with MinGW on // Windows. We do it anyway, see if we find any problems on the way. - PyObject *capsule = PyCapsule_New(data, LASP_CAPSULE_NAME, capsule_cleanup); - int res = PyArray_SetBaseObject(arr, capsule); - if (res != 0) { - fprintf(stderr, "Failed to set base object of array!"); - return NULL; - } + /* PyObject *capsule = PyCapsule_New(data, LASP_CAPSULE_NAME, capsule_cleanup); */ + /* int res = PyArray_SetBaseObject(arr, capsule); */ + /* if (res != 0) { */ + /* fprintf(stderr, "Failed to set base object of array!"); */ + /* return NULL; */ + /* } */ PyArray_ENABLEFLAGS(arr, NPY_OWNDATA); }