Skip to content

Commit 6a0a950

Browse files
meeseeksmachinejreback
authored andcommitted
Backport PR #21966: Fix memory leak in roll_quantile (#21973)
1 parent 5609eff commit 6a0a950

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
@@ -27,6 +27,7 @@ Bug Fixes
2727
**Groupby/Resample/Rolling**
2828

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

3233
**Conversion**

pandas/_libs/window.pyx

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

1485+
skiplist_destroy(skiplist)
1486+
14851487
return output
14861488

14871489

0 commit comments

Comments
 (0)