Subject: | [PATCH] XML::RAI::Object leaks memory! |
Date: | Mon, 7 Apr 2008 09:51:53 -0700 |
To: | bug-XML-RAI [...] rt.cpan.org |
From: | Mark Glines <mark [...] glines.org> |
Hi,
It seems XML::RAI leaks a few thousand scalars every time I run
XML::RAI->parse_string(). I am using it in a long-running process,
whose memory was noticeably increasing over time, so this is a bad
thing.
To test it, I wrote the attached test script. It uses XML::RAI to
parse the (also attached) rss.xml, and it uses Devel::Leak to show how
many new objects were created (and not freed) after 10 invocations of
that.
Without the patch, I get:
% perl test.pl 2>&1 | grep ^new | wc -l
31521
With the patch, I get:
% perl test.pl 2>&1 | grep ^new | wc -l
312
Please consider applying this patch, it seems to help a lot. It will
also require adding Task::Weaken to the list of dependencies, in
Makefile.PL.
Thanks,
Mark
Message body is not shown because sender requested not to inline it.
Message body is not shown because sender requested not to inline it.
Message body not shown because it is not plain text.