Posted on 2009-03-17 11:29:45-07 by codechild
Leaks Now Fixed
Version 0.42 has now been released on CPAN and should resolve memory leak issues. Note that during my leak testing I have found that the following code reports leaks:
my ( $ob, $xml ) = new XML::Bare( text => 'test' );


Adding an undef lines as follows resolves this:
my ( $ob, $xml ) = new XML::Bare( text => 'test' ); undef $ob->{'xml'};


I would recommend doing an undef anywhere you are worried about memory leaks. I am not convinced yet there actually -is- a memory leak without doing the undef. If someone who is having an issue could try it both ways and let me know if there is a difference it would be helpful.
Direct Responses: Write a response
Perl Weekly newsletter
A free weekly newsletter for people who are busy to read all the blogs. click here to check it out.