Re: [PHP-I18N] PHP intl APIs - part 1
[email protected] (Stanislav Malyshev) Wed, 18 Jul 2007 10:26:31 -0700
| Newsgroups | php.i18n |
|---|---|
| Organization | Zend Technologies |
| Message-ID | <[email protected]> |
> 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 [email protected] http://www.zend.com/ (408)253-8829 MSN: [email protected]