Geoffrey Young wrote:

it's probably better to have a new 'sub cleanup_sub_pool', otherwise how do we know that it's not the main pool that gets destroyed twice?

  +    # should destroy the subpool too, so
  +    # cleanup is called twice
       $p->destroy;



also should we test that a sub-pool is destroyed before the main pool?


how about this

+1, but could also do:


sub cleanup {
    my ($r, $what) = @{+shift};
    $r->notes->add(cleanup => $what);
    1;
}
...
$p->cleanup_register(   \&cleanup, [$r, 'parent']);
$subp->cleanup_register(\&cleanup, [$r, 'child']);

either way is good, just trying to put new features to stress ;)

also will this call destroy on $p on the exit from { } ?

{
    my $p = APR::Pool->new;
}

I think it should.

__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to