Hi,

just a simple question. If I am creating zvals like this:

zval *zExample;
MAKE_STD_ZVAL(zExample);

do I have to free this zval manually (With FREE_ZVAL(zExample)) or is this 
done automatically? Or it is done automatically only if this zval is exported 
to user space? I ask because I have trouble with freeing zvals. I create two 
zvals in the modules init-function. ONE of those zvals I am exporting to the 
global symbol table. In the modules shutdown function I want to free those 
zvals. But I get a segfault after script execution, if I'm freeing the 
exported zval. The local zval (which is not accesible from the PHP script) 
can be freed without problems. 

Currently it looks to me, that I don't need to free zvals which I have 
exported to a symbol table, because PHP already frees the zval on module 
shutdown. Is that correct? Or do I need to remove the zval from the symbol 
table and then free the zval manually? How it is done correctly?

-- 
Bye, K <http://www.ailis.de/~k/>
[A735 47EC D87B 1F15 C1E9  53D3 AA03 6173 A723 E391]
(Finger [EMAIL PROTECTED] to get public key)

-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to