You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by gr...@verio.net on 2000/04/22 00:58:02 UTC

destroy_dir_config ?

Sorry if this is a dumb question or if I'm posting to the wrong list!


Am I right to conclude that there is no destroy_dir_config (or anything
that provides such functionality), so any memory in create_dir_config
handle MUST be allocated using apache routines that use pools, or you
never get a chance to free that memory?

I'm writing a module where I would prefer to store the config values in a
Python structure (this is for mod_python), but Python cannot use Apache
pools - am I SOL?

Is there any kind of an event that I can hook so that when a pool is
destroyed, I can do some of my own destruction?

Thanks!

Grisha


Re: destroy_dir_config ?

Posted by Greg Stein <gs...@lyra.org>.
On Fri, 21 Apr 2000 grisha@verio.net wrote:
> Sorry if this is a dumb question or if I'm posting to the wrong list!

This is close. The apache-modules list is probably a bit closer. See
http://modules.apache.org/subscribe#API

> Am I right to conclude that there is no destroy_dir_config (or anything
> that provides such functionality),

Correct.  But...

> so any memory in create_dir_config
> handle MUST be allocated using apache routines that use pools, or you
> never get a chance to free that memory?
> 
> I'm writing a module where I would prefer to store the config values in a
> Python structure (this is for mod_python), but Python cannot use Apache
> pools - am I SOL?
> 
> Is there any kind of an event that I can hook so that when a pool is
> destroyed, I can do some of my own destruction?

Yes. Take a look at the ap_register_cleanup() function and its friends.
This will give you a chance to call Py_DECREF() when the pool goes away.

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/