Project

Profile

Help

Bug #6392

closed

Memory leak in PySaxonProcessor (Python)

Added by Andy Knight 3 months ago. Updated 14 days ago.

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

100%

Estimated time:
(Total: 0:00 h)
Applies to branch:
Fix Committed on Branch:
12
Fixed in Maintenance Release:
Found in version:
Fixed in version:
12.5
SaxonC Languages:
SaxonC Platforms:
SaxonC Architecture:

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


Sub-issues 4 (0 open4 closed)

Bug #6391: Possible memory leak in Python processor?ClosedMatt Patterson2024-04-14

Actions
Bug #6396: (Another?) memory leak when using XQuery?ClosedO'Neil Delpratt2024-04-16

Actions
Bug #6397: Another? memory leak when using XPathClosedO'Neil Delpratt2024-04-16

Actions
Bug #6398: Another? memory leak when using XSLTClosedMatt Patterson2024-04-16

Actions

Please register to edit this issue

Also available in: Atom PDF