On Tue, Jan 22, 2002 at 09:27:53AM +0100, Robin Ericsson wrote: > I'm using this on php 4.0.6, it know it's old, but things will break if > I upgrade :) > > This is the code: > > zval *z_return; > MAKE_STD_ZVAL(z_return); > > php_char_to_str(retval, strlen(retval), '\n', "<br>\n", 5, z_return); > > FREE_ZVAL(z_return); > > > This code gives me: > string.c(2122) : Freeing 0x08257CEC (134 bytes), script=nn.php > > which is the new string allocated inside php_char_to_str(), howcome this > memory isn't freed with FREE_ZVAL?
FREE_ZVAL only frees the zval and does not destroy (read =free) the attached data-structures. use zval_dtor for that. tc -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]