|
|
@ -514,23 +514,23 @@ public function Empty(optional bool deallocateKeys) |
|
|
|
{ |
|
|
|
{ |
|
|
|
if (!nextEntries[j].managed) continue; |
|
|
|
if (!nextEntries[j].managed) continue; |
|
|
|
if (nextEntries[j].value == none) continue; |
|
|
|
if (nextEntries[j].value == none) continue; |
|
|
|
if ( nextEntries[j].value.GetLifeVersion() |
|
|
|
nextEntries[j].value.FreeSelf(nextEntries[j].valueLifeVersion); |
|
|
|
!= nextEntries[j].valueLifeVersion) { |
|
|
|
|
|
|
|
continue; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
if (deallocateKeys) |
|
|
|
if (deallocateKeys) |
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
for (j = 0; j < nextEntries.length; j += 1) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if (nextEntries[j].key == none) { |
|
|
|
|
|
|
|
continue; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if ( nextEntries[j].key.GetLifeVersion() |
|
|
|
|
|
|
|
!= nextEntries[j].keyLifeVersion) { |
|
|
|
|
|
|
|
continue; |
|
|
|
|
|
|
|
} |
|
|
|
subCollection = Collection(nextEntries[j].value); |
|
|
|
subCollection = Collection(nextEntries[j].value); |
|
|
|
if (subCollection != none) { |
|
|
|
if (subCollection != none) { |
|
|
|
subCollection.Empty(true); |
|
|
|
subCollection.Empty(true); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
nextEntries[j].value.FreeSelf(nextEntries[j].valueLifeVersion); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (deallocateKeys) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
for (j = 0; j < nextEntries.length; j += 1) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if (nextEntries[j].key != none) { |
|
|
|
if (nextEntries[j].key != none) { |
|
|
|
nextEntries[j].key.FreeSelf(nextEntries[j].keyLifeVersion); |
|
|
|
nextEntries[j].key.FreeSelf(nextEntries[j].keyLifeVersion); |
|
|
|
} |
|
|
|
} |
|
|
|