Closed mhugo closed 1 year ago
Thanks @mhugo for the concise and useful report. I just double-checked I can reproduce the issue on my side. I'll have a look now to see if I can quickly find out the culprit, otherwise it might take a bit longer.
@mhugo: found it and potentially fixed it, please give it a try under the issue-97
branch.
It indeed was very specific to the yajl2_c
backend, but it actually affected all generator functions (basic_parse
, parse
, kvitems
and items
), but not the async or push interfaces.
Hi @rtobar Thank you very much for your quick answer !
I confirm the problem is solved on the issue-97
branch. I've tested it on my small test and on my application code and I can't see the memory leak anymore.
When do you think would be the next release that will include this fix ?
@mhugo thanks for the confirmation :+1:
I've put the fix now in master
and will release 3.2.1 after that with the fix (and support for Python 3.12, which was fixed recently as well). I'm closing this issue now though as the fix is already available.
3.2.1 has now been published
Excellent ! Thank you very much again for your reactivity
Describe the bug
I think I found a memory leak with the yajl2_c backend when
ijson.items
raises an exception, some memory does not seem to be correctly deallocated.**How to reproduce***
Here is a small Python code to reproduce the issue:
Example output:
Expected behavior
The same run, but with less memory consumed :)
Execution information: