Date: 12/18/00
- Next message: Hartmut Holzgraefe: "[PHP-DEV] Re: [PHP-QA] convention about function naming II"
- Previous message: andrei <email protected>: "[PHP-DEV] PHP 4.0 Bug #8272 Updated: ext/pcre/pcrelib/pgrep.c includes a missing config.h file"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Sat, 16 Dec 2000, Ragnar Kjørstad wrote:
> Hi
>
> I sent this message to the list a few weeks ago, but didn't get any
> response, so I'm giving it another shot.
>
> Specificly, I need to know if the following is correct:
>
> zval *a;
> ALLOC_INIT_ZVAL(a);
> array_init(a);
> add_next_index_string(a, string, 1);
> add_next_index_string(a, string2, 1);
> // hmm
> FREE_ZVAL(a);
>
> or if it's leaking memory, and I need to do some magic before FREE_ZVAL
> to free the copies of the strings and the array-metadata.
you need to do zval_dtor(a) or zval_del_ref(&a) (the latter will also do
FREE_ZVAL(a) if the refcount is 0)
-Andrei
* Black holes are where God divided by zero. *
-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Hartmut Holzgraefe: "[PHP-DEV] Re: [PHP-QA] convention about function naming II"
- Previous message: andrei <email protected>: "[PHP-DEV] PHP 4.0 Bug #8272 Updated: ext/pcre/pcrelib/pgrep.c includes a missing config.h file"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

