Re: Parsing error when parsing the second time

Andy Grundman <[email protected]>
Newsgroups gmane.comp.apache.apreq
Message-ID <[email protected]>
On Mar 30, 2007, at 11:39 PM, Joe Schaefer wrote:

> Andy Grundman <[email protected]> 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.