Concern about changing zval's passed by reference
| From: | Robert Twitty | Date: | Tue, 25 Nov 2003 15:07:38 +0000 |
| Subject: | Concern about changing zval's passed by reference | ||
| Groups: | php.pecl.dev | ||
| Request: | Send a blank email to pecl-dev+get-230@lists.php.net to get a copy of this message | ||
Hello
I am using the macros ZVAL_BOOL, ZVAL_LONG, ZVAL_DOUBLE and ZVAL_STRING to
change the value of a zval passed by reference. I noticed that these
macros do not free the original value if it's a string, array, object or
resource prior to the change. This causes a possible memory leak. Is
this a normal practice? And, if not, what is the accepted practice for
changing zval's passed by reference?
-- bob