File tree 2 files changed +2
-0
lines changed
pandas/_libs/src/ujson/python
2 files changed +2
-0
lines changed Original file line number Diff line number Diff line change 966
966
- Bug in :func: `read_json ` raising ``ValueError `` when attempting to parse json strings containing "://" (:issue: `36271 `)
967
967
- Bug in :func: `read_csv ` when ``engine="c" `` and ``encoding_errors=None `` which caused a segfault (:issue: `45180 `)
968
968
- Bug in :func: `read_csv ` an invalid value of ``usecols `` leading to an unclosed file handle (:issue: `45384 `)
969
+ - Bug in :meth: `DataFrame.to_json ` fix memory leak (:issue: `43877 `)
969
970
970
971
Period
971
972
^^^^^^
Original file line number Diff line number Diff line change @@ -228,6 +228,7 @@ static PyObject *get_values(PyObject *obj) {
228
228
PyErr_Clear ();
229
229
} else if (PyObject_HasAttrString (values , "__array__" )) {
230
230
// We may have gotten a Categorical or Sparse array so call np.array
231
+ Py_DECREF (values );
231
232
values = PyObject_CallMethod (values , "__array__" , NULL );
232
233
} else if (!PyArray_CheckExact (values )) {
233
234
// Didn't get a numpy array, so keep trying
You can’t perform that action at this time.
0 commit comments