xerces-p-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shawn W. Devlin" <sdev...@recognia.com>
Subject How to parse multiple documents?
Date Fri, 10 May 2002 14:39:46 GMT

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.



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();

    my $ErrorHandler = XML::Xerces::PerlErrorHandler->new();

    my $is = 
    $is = undef;

    $Document = $Parser->getDocument();
    $Document = undef;
    $Parser = undef;
    $ErrorHandler = undef;
    $key = <STDIN>;

To unsubscribe, e-mail: xerces-p-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-p-dev-help@xml.apache.org

View raw message