Re: PHP intl APIs - part 1

From: Date: Wed, 18 Jul 2007 17:26:31 +0000
Subject: Re: PHP intl APIs - part 1
References: 1 2 3 4  Groups: php.i18n 
Request: Send a blank email to php-i18n+get-1097@lists.php.net to get a copy of this message
1) If I define a collator $coll, and then I reassign $coll to something else (perhaps another collator) is the original collator stored in $coll left in memory or will it get cleaned up at some point?
It's cleaned up immediately.
2) Should we consider any functions useful for debugging memory leaks? I have in mind something like collator_count() to return a count of the existing collators. I know about get_defined_vars() but I was thinking the collators might become separated from a variable and then be lost...
PHP has mechanisms for tracking memory leaks, so I don't think we need anything special in extension APIs. Speaking of which, we might want to use u_setMemoryFunctions (see http://www.icu-project.org/apiref/icu4c/uclean_8h.html#5dea766c5e726833400dc0ee24a2bc6a) to make ICU use PHP's memory function. This, however, depends on whether ICU allocates any persistent data (caches, etc.) with these functions. -- Stanislav Malyshev, Zend Software Architect stas@zend.com http://www.zend.com/ (408)253-8829 MSN: stas@zend.com

« previous php.i18n (#1097) next »