perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Geoffrey Young <ge...@modperlcookbook.org>
Subject Re: Connection pnotes
Date Fri, 10 Mar 2006 20:30:52 GMT

> All tests pass for me on various platforms, but...
> 
> Where do you cleanup HV *modperl_config_con_t->pnotes ? Looks to me
> like you are leaking it. You'd need something similar to what we
> are doing for request pnotes:
> 
> apr_status_t modperl_config_request_cleanup(pTHX_ request_rec *r)
> {
>     [...]
> 
>     if (rcfg->pnotes) {
>         SvREFCNT_dec(rcfg->pnotes);
>         rcfg->pnotes = Nullhv;
>     }

I have some comments on that in the code

    /* note we do not need to implement a per-connection cleanup to
     * reset $c->pnotes.  this is because we don't hook into
     * ap_hook_create_connection and therefore each new connection
     * has no &perl_module data in the configuration vector

however, refcounting isn't really my thing, so I'll accept your analysis if
you think mine above is insufficient (which it may well be, since you're
smarter about these things than I am :)

--Geoff

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Mime
View raw message