Skip to content

Commit 27ebb3e

Browse files
fl4p-oldjreback
authored andcommitted
Fix memory leak in roll_quantile (#21966)
1 parent 3cb64bd commit 27ebb3e

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

doc/source/whatsnew/v0.23.4.txt

+1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ Bug Fixes
3131
**Groupby/Resample/Rolling**
3232

3333
- Bug where calling :func:`DataFrameGroupBy.agg` with a list of functions including ``ohlc`` as the non-initial element would raise a ``ValueError`` (:issue:`21716`)
34+
- Bug in ``roll_quantile`` caused a memory leak when calling ``.rolling(...).quantile(q)`` with ``q`` in (0,1) (:issue:`21965`)
3435
-
3536

3637
**Conversion**

pandas/_libs/window.pyx

+2
Original file line numberDiff line numberDiff line change
@@ -1481,6 +1481,8 @@ def roll_quantile(ndarray[float64_t, cast=True] input, int64_t win,
14811481
else:
14821482
output[i] = NaN
14831483

1484+
skiplist_destroy(skiplist)
1485+
14841486
return output
14851487

14861488

0 commit comments

Comments
 (0)