Message106610
It is all to easy to forget to "unlink()" minidom documents resulting in huge memory usage.
This patch allows to automate that process with a context manager, similar to how files can be closed in the same way:
with xml.dom.minidom.parse() as dom:
workwith(dom)
will automatically call dom.unlink() when context manager is exited.
Patch provided. |
|
Date |
User |
Action |
Args |
2010-05-27 13:03:02 | kristjan.jonsson | set | recipients:
+ kristjan.jonsson |
2010-05-27 13:03:02 | kristjan.jonsson | set | messageid: <1274965382.14.0.210712489615.issue8832@psf.upfronthosting.co.za> |
2010-05-27 13:03:00 | kristjan.jonsson | link | issue8832 messages |
2010-05-27 13:02:59 | kristjan.jonsson | create | |
|