RE: [PHP-I18N] PHP intl APIs - part 1
[email protected] ("tex") Wed, 18 Jul 2007 11:46:12 -0700
| Newsgroups | php.i18n |
|---|---|
| Message-ID | <[email protected]> |
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'; [email protected]; '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