RE: [PHP-I18N] PHP intl APIs - part 1

From: Date: Wed, 18 Jul 2007 18:46:12 +0000
Subject: RE: [PHP-I18N] PHP intl APIs - part 1
References: 1 2 3 4 5  Groups: php.i18n 
Request: Send a blank email to php-i18n+get-1099@lists.php.net to get a copy of this message
Ok, sounds pretty good. Thanks for the explanations. tex -----Original Message----- From: Vadim Savchuk [mailto:vsavchuk@productengine.com] Sent: Wednesday, July 18, 2007 6:40 AM To: tex@yahoo-inc.com 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

« previous php.i18n (#1099) next »