Closed bleargh45 closed 11 years ago
Thanks so much for this! Sorry it took me so long to get to it.
On May 1, 2013 08:41:46 PM Olaf Alders wrote:
Thanks so much for this! Sorry it took me so long to get to it.
No worries! Glad to see that its getting in and going up. :D
Graham TerMarsch
When the HTML::Parser object is created in "_build_parser", it holds a reference to "$self" (the HTML::Restrict object) in the closures used to do the parsing. That creates a circular reference between the HTML::Parser object and the HTML::Restrict object, which then causes us to leak memory every time we're used (as neither of the objects will ever get freed).
So, weaken our handle to the HTML::Parser object, breaking the circular reference.