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 -- PHP Unicode & I18N Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php