Skip to content

Commit a4be61f

Browse files
committed
Add fresh NEWS entry for JSON encoder memory leak fix
1 parent cafe9ba commit a4be61f

2 files changed

Lines changed: 5 additions & 10 deletions

File tree

Misc/NEWS.d/next/Library/2026-03-19-04-18-27.gh-issue-146152.Ifrd7O.rst

Lines changed: 0 additions & 10 deletions
This file was deleted.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Fix a memory leak in the :mod:`json` module when a RecursionError occurs
2+
during encoding. Previously, objects created in the `default()` function
3+
while recursively encoding JSON could remain alive due to being tracked
4+
indefinitely in the encoder's internal circular-reference dictionary. This
5+
change ensures such objects are properly freed after the exception.

0 commit comments

Comments
 (0)