On Mon, 8 Jul 2002, Richard Clarke wrote:

>     "During the child exit phase, mod_perl invokes the Perl API function
> perl_destruct( ) to run the contents of END blocks and to invoke the
> DESTROY method for any global objects that have not gone out of scope
> already."

Notice where it says "... for any global objects that have not gone out of
scope already".

In the code I posted, $r goes out of scope at the end of the handler
subroutine.

>     So I think i'm right in saying that, "When I run this, the DESTROY
> method is not called until the server shuts down." is perfectly normal
> behaviour. I don't know how you are actually testing your "memory

Well, creating an Apache::DESTROY method works and shows the Apache object
going out of scope on a per-request basis.

> usage", but I might suggest that if you are sending larger amounts of
> data than previously, just once per 5000 requests then this memory is
> gonna be consumed by apache forever (at least until httpd is killed).

I tested with ab sending the same request thousands of times in a row.


-dave

/*==================
www.urth.org
we await the New Sun
==================*/

Reply via email to