This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author kristjan.jonsson
Recipients kristjan.jonsson
Date 2010-05-27.13:02:58
SpamBayes Score 0.11383673
Marked as misclassified No
Message-id <1274965382.14.0.210712489615.issue8832@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2010-05-27 13:03:02kristjan.jonssonsetrecipients: + kristjan.jonsson
2010-05-27 13:03:02kristjan.jonssonsetmessageid: <1274965382.14.0.210712489615.issue8832@psf.upfronthosting.co.za>
2010-05-27 13:03:00kristjan.jonssonlinkissue8832 messages
2010-05-27 13:02:59kristjan.jonssoncreate