Skip to content

Commit

Permalink
Merge pull request #315 from pariterre/dev
Browse files Browse the repository at this point in the history
Fixed memory leak when using to_array() in python
  • Loading branch information
pariterre authored Feb 15, 2024
2 parents 1c93522 + 3b9120e commit 5c3add4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions binding/python3/ezc3d_python.i
Original file line number Diff line number Diff line change
Expand Up @@ -495,6 +495,7 @@ PyArrayObject *helper_getPyArrayObject( PyObject *input, int type) {
}
PyObject* output = PyArray_SimpleNewFromData(nArraySize,arraySizes,NPY_DOUBLE, mat);
PyArray_ENABLEFLAGS((PyArrayObject *)output, NPY_ARRAY_OWNDATA);
delete[] arraySizes;
return output;
};
}
Expand Down

0 comments on commit 5c3add4

Please sign in to comment.