[html-formfu] Memory leaks because of
Catalyst::Controller::HTML::FormFu?
Octavian Rasnita
orasnita at gmail.com
Sat Aug 14 12:39:56 GMT 2010
Hi,
I have an applications that has big memory leaks so I started to search and solve them.
As a test, I created a Catalyst app using:
catalyst.pl Leaker
And I added the role CatalystX::LeakChecker to the module Leaker.pm:
extends 'Catalyst';
with 'CatalystX::LeakChecker';
I started the internal server using script/leaker_server.pl -p 80 and I accessed the app in the browser.
It was all right and no leaks were reported in the generated log.
Then I changed the controller Root.pm to extend
Catalyst::Controller::HTML::FormFu:
BEGIN { extends 'Catalyst::Controller::HTML::FormFu' }
I restarted the app and accessed it again in the browser.
This time, Catalyst::LeakChecker reported a leak found in the log with something like:
[debug] Circular reference detected:
.------------------------------------------------------------------------.
| $ctx->{stash}->{__InstancePerContext_58412720}->{c} |
'------------------------------------------------------------------------'
So it obviously has something to do with C::C::H::FormFu.
Then I accessed http://localhost/?dump_info=1
and I searched for __InstancePerContext_58412720.
I found that it appears for more times in the dump closed to things related to C::C::H::FormFu.
Does anyone know if HTML::FormFu or C::C::H::FormFu has memory leaks or it is just a false alert?
If you have any idea, please give me some hints about how I can solve this issue.
Thanks.
Octavian
More information about the HTML-FormFu
mailing list