Hello,
My program (using Xerces 1.5.2, Linux) waits for a signal then loads and
parses an XML document. Over a prolonged run I found that my program
used all available memory on the box. After stripping away all of the
extra code, I was able to determine that it is the Xerces module that is
not releasing the memory. I am sure that the problem lies with my code
in that I am not calling some method to release the memory but I cannot
find that method. I have tried various combinations of defining and
undefining variables and so far no luck.
If someone could point out my mistake it would be greatly appreciated.
Thanks,
Shawn
PS. The following is a program that exhibits the behaviour:
#!/usr/bin/perl -w
use strict;
use XML::Xerces;
use XML::Xerces::DOMParse;
my $Document = '';
my $key = '';
while ($key ne "q\n") {
my $Parser = XML::Xerces::DOMParser->new();
$Parser->setValidationScheme($XML::Xerces::DOMParser::Val_Auto);
$Parser->setDoNamespaces(0);
$Parser->setCreateEntityReferenceNodes(1);
$Parser->setDoSchema(0);
$Parser->setToCreateXMLDeclTypeNode(1);
my $ErrorHandler = XML::Xerces::PerlErrorHandler->new();
$Parser->setErrorHandler($ErrorHandler);
my $is =
XML::Xerces::LocalFileInputSource->new("/recog_logs/daemon.pat");
$Parser->parse($is);
$is = undef;
$Document = $Parser->getDocument();
$Document = undef;
$Parser = undef;
$ErrorHandler = undef;
$key = <STDIN>;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]