зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1009263 - Add nsCheapSets::Clear() method that removes all entries and return it to minimal size in terms of memory use. r=bsmedberg
This commit is contained in:
Родитель
24ea7f9b72
Коммит
257e69aae5
|
@ -24,6 +24,14 @@ public:
|
|||
{
|
||||
}
|
||||
~nsCheapSet()
|
||||
{
|
||||
Clear();
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove all entries.
|
||||
*/
|
||||
void Clear()
|
||||
{
|
||||
switch (mState) {
|
||||
case ZERO:
|
||||
|
@ -38,6 +46,7 @@ public:
|
|||
NS_NOTREACHED("bogus state");
|
||||
break;
|
||||
}
|
||||
mState = ZERO;
|
||||
}
|
||||
|
||||
nsresult Put(const KeyType aVal);
|
||||
|
|
Загрузка…
Ссылка в новой задаче