memory usage in mod_perl

Bradley Baetz bbaetz at acm.org
Wed Jan 17 10:48:27 UTC 2007


On 17/01/07, David Miller <justdave at bugzilla.org> wrote:
> Max Kanat-Alexander wrote on 1/16/07 8:21 PM:
> > On Tue, 16 Jan 2007 20:07:41 -0500 David Miller <justdave at bugzilla.org>
> > wrote:
> >> You probably have to walk the hash and undef all the things in it.
> >> If you just undef the hash you leave a bunch of orphaned references.
> >
> >       Yes, but *what hash*? In a CleanupHandler, no variables are
> > available.
>
> It's all in $vars at the point it gets dumped to the template.  Perhaps
> recursively nuking $vars after the templates are displayed before
> exiting would work.

Yeah, but $vars isn't global, is it?

Perl does free up memory unless you end up with cycles; strictly
speaking its libc/the kernel that won't ever free it up.

> On the other hand, that would be bad if we had stuck a reference to
> anything that should stay cached in $vars.

Not across requests, though.

Bradley



More information about the developers mailing list