XML::Simple - memory leak?

J

Joe Casadonte

I've got a simple script, that consumes enormous amounts of memory:

while (<IN>) {
chomp;

next unless m{sampleResult};

my($xml) = eval { XMLin($_, %SIMPLE_OPTS); };
if ($@) {
warn qq(Malformed XML - $fname: $. - $@\n);
next;
}

$xml = undef;
}

close IN;

Underlying XML::Simple is XML::Sax::Expat, and of course it's possible
(probable?) that the problems lies somewhere below XML::Simple. It
happens with or without the eval, so that's not an issue.

===
This is perl, v5.8.0 built for MSWin32-x86-multi-thread
(with 1 registered patch, see perl -V for more detail)

Copyright 1987-2002, Larry Wall

Binary build 804 provided by ActiveState Corp. http://www.ActiveState.com
Built 23:15:13 Dec 1 2002
===
perl -MXML::Simple -e "print $XML::Simple::VERSION"
1.06

(that's the latest version available via 'ppm' -- maybe that's my issue?)
===

Any help would be appreciated. Thanks!

--
Regards,

joe
Joe Casadonte
(e-mail address removed)

------------------------------------------------------------------------------
Llama Fresh Farms => http://www.northbound-train.com
Gay Media Resource List => http://www.northbound-train.com/gaymedia.html
Perl for Win32 => http://www.northbound-train.com/perlwin32.html
Emacs Stuff => http://www.northbound-train.com/emacs.html
Music CD Trading => http://www.northbound-train.com/cdr.html
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top