Project

Profile

Help

Bug #6392

open

Memory leak in PySaxonProcessor (Python)

Added by Andy Knight about 1 month ago. Updated 29 days ago.

Status:
In Progress
Priority:
Normal
Category:
-
Start date:
2024-04-14
Due date:
% Done:

0%

Estimated time:
Found in version:
Fixed in version:
Platforms:

Description

Consider the following code fragment:

from saxonche import PySaxonProcessor import psutil

count = 0 prev = (mi := psutil.Process().memory_info)().rss

for _ in range(100): with PySaxonProcessor(license=False): pass if (count := count + 1) % 10 == 0: m = mi().rss print(f"{m - prev:,}") prev = m

It can be observed that memory usage increases over time. The exit functionality of the PySaxonProcessor class is not "cleaning up" as robustly as it should.

Python 3.12.2 saxonche 12.4.2 macOS 14.4.1 M2

Please register to edit this issue

Also available in: Atom PDF