Re: PHP intl APIs - part 1
| From: | Vadim Savchuk | Date: | Wed, 18 Jul 2007 13:40:28 +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-1096@lists.php.net to get a copy of this message | ||
tex wrote:
> 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?
Let me answer with examples.
//-- Example 1 --------------------------------------------------------
$c1 = new Collator( "en_US" ); // creates a collator
$c2 = $c1; // creates a reference to the collator
unset( $c1, $c2 ); // destroys the collator
//---------------------------------------------------------------------
//-- Example 2 -----------------------------------------
$c1 = new Collator( "en_US" ); // creates collator #1
$c2 = new Collator( "ru_RU" ); // creates collator #2
$c1 = $c2; // destroys collator #1
unset( $c1, $c2 ); // destroys collator #2
//------------------------------------------------------
> 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 don't think we should modify the API for debugging purposes.
--
Vadim