Date: 05/12/01
- Next message: Sebastian Bergmann: "Re: [PHP-DEV] Re: [PHP-CVS] cvs: php4 /ext/xml config.m4php_xml.hxml.c/ext/xml/expat Changes Makefile.in README README.phpascii.hasciitab.hexpat.html iasciitab.h latin1tab.h nametab.hutf8tab.hxmlparse.cxmlrole.c xmlrole.h xmltok.c xmltok.h xmlt"
- Previous message: Thies C. Arntzen: "Re: [PHP-DEV] Re: [PHP-CVS] cvs: php4 /ext/xml config.m4 php_xml.hxml.c/ext/xml/expat Changes Makefile.in README README.php ascii.hasciitab.hexpat.html iasciitab.h latin1tab.h nametab.h utf8tab.hxmlparse.cxmlrole.c xmlrole.h xmltok.c xmltok.h xmlt"
- In reply to: Jason Greene: "Re: [PHP-DEV] zval_copy_ctor"
- Next in thread: Jason Greene: "Re: [PHP-DEV] zval_copy_ctor"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 2001-05-12 04:29:19, "Jason Greene" <jason <email protected>> wrote:
> zval_copy_ctor used on an array makes a reference copy of the array.
> Basically, it just copies all the data items in the hashtable and then
adds one to the
> reference count for all data items.
>
> Looking at the code, it appears to not recursively copy into nested
arrays.
> (Could be part of your problem)
> Since this is a reference copy, you can not free the memory used by
> the array you are copying. I am assuming that this is the cause of your
default.
Strange stuff.
Is there a nice handy API to copy the array completely?
I switched to zval_copy_ctor from a manually maintained hash table and
copying loop for readability; it's a shame to have to switch back.
I'll dig a bit more; I've just thought of another piece of code that might
be the culprit...
--Wez.
-- 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: Sebastian Bergmann: "Re: [PHP-DEV] Re: [PHP-CVS] cvs: php4 /ext/xml config.m4php_xml.hxml.c/ext/xml/expat Changes Makefile.in README README.phpascii.hasciitab.hexpat.html iasciitab.h latin1tab.h nametab.hutf8tab.hxmlparse.cxmlrole.c xmlrole.h xmltok.c xmltok.h xmlt"
- Previous message: Thies C. Arntzen: "Re: [PHP-DEV] Re: [PHP-CVS] cvs: php4 /ext/xml config.m4 php_xml.hxml.c/ext/xml/expat Changes Makefile.in README README.php ascii.hasciitab.hexpat.html iasciitab.h latin1tab.h nametab.h utf8tab.hxmlparse.cxmlrole.c xmlrole.h xmltok.c xmltok.h xmlt"
- In reply to: Jason Greene: "Re: [PHP-DEV] zval_copy_ctor"
- Next in thread: Jason Greene: "Re: [PHP-DEV] zval_copy_ctor"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

