Skip Menu |

This queue is for tickets about the POE-Filter-XML CPAN distribution.

Report information
The Basics
Id: 32401
Status: resolved
Priority: 0/
Queue: POE-Filter-XML

People
Owner: nperez [...] cpan.org
Requestors: ewaters [...] uarc.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.33
Fixed in: (no value)



Subject: Memory leak still present
While the code changes done recently to avoid the XML::SAX::Expat::Incremental memory leak upon DESTROY() appear to deal with that issue, the parser object is destroyed and recreated upon reset(), incurring a memory leak. In code that calls reset() frequently, this bloats the program. Simply applying the weaken code in DESTROY() to reset() appears to fix the issue in my tests.
From: nperez [...] cpan.org
Alrighty, that is a good catch. Definitely need to do the release() dance on the parser object. What a shitty piece of code. I'm this |> <| tempted to rip it out and replace it with something else. I'll see about getting a release out in a bit. Might take awhile though. Thanks :) On Thu Jan 17 17:12:31 2008, ewaters@uarc.com wrote: Show quoted text
> While the code changes done recently to avoid the > XML::SAX::Expat::Incremental memory leak upon DESTROY() appear to deal > with that issue, the parser object is destroyed and recreated upon > reset(), incurring a memory leak. In code that calls reset() > frequently, this bloats the program. Simply applying the weaken code in > DESTROY() to reset() appears to fix the issue in my tests.
Okay, I have this fixed and in svn on googlecode: http://code.google.com/p/pfx/ I went ahead and broke out the parser frobbing into its own method and call it from destroy and from reset On Fri Jan 18 08:26:14 2008, NPEREZ wrote: Show quoted text
> Alrighty, that is a good catch. Definitely need to do the release() > dance on the parser object. What a shitty piece of code. I'm this |> <| > tempted to rip it out and replace it with something else. > > I'll see about getting a release out in a bit. Might take awhile though. > > Thanks :) > > On Thu Jan 17 17:12:31 2008, ewaters@uarc.com wrote:
> > While the code changes done recently to avoid the > > XML::SAX::Expat::Incremental memory leak upon DESTROY() appear to deal > > with that issue, the parser object is destroyed and recreated upon > > reset(), incurring a memory leak. In code that calls reset() > > frequently, this bloats the program. Simply applying the weaken code in > > DESTROY() to reset() appears to fix the issue in my tests.
>