Ok, sounds pretty good. Thanks for the explanations. tex -----Original Message----- From: Vadim Savchuk [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 18, 2007 6:40 AM To: [EMAIL PROTECTED] Cc: 'Stanislav Malyshev'; php-i18n@lists.php.net; 'Hardik' Subject: Re: [PHP-I18N] PHP intl APIs - part 1
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