httpd-apreq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andy Grundman <a...@hybridized.org>
Subject Re: Parsing error when parsing the second time
Date Sat, 31 Mar 2007 03:51:30 GMT

On Mar 30, 2007, at 11:39 PM, Joe Schaefer wrote:

> Andy Grundman <andy@hybridized.org> writes:
>
>>
>> urlencoded();
>> urlencoded();
>>
>> sub urlencoded {
>>     my $pool = APR::Pool->new;
>
> The pool cleanup code is pretty wicked in the APR::Pool xs code.
> If you can get away with using a single global pool, I think
> you'll be better off.

Hey what do you know, moving the pool out of the sub does indeed fix  
the problem!

I also tried $pool->clear and $pool->destroy at the end of the sub,  
but it didn't help.

The APR::Pool docs warn about memory leakage if using a global pool,  
do you think I should be calling $pool->clear after every time I use it?

Thanks,
-Andy

Mime
View raw message