ENH: RemoveAll() memory performance enhancement.

This commit is contained in:
Mojmir Fendek 2022-05-10 15:43:51 +12:00
parent 35d5f16286
commit 26d59944e0
1 changed files with 1 additions and 1 deletions

View File

@ -1174,7 +1174,7 @@ class DataList extends ViewableData implements SS_List, Filterable, Sortable, Li
*/
public function removeAll()
{
foreach ($this as $item) {
foreach ($this->getGenerator() as $item) {
$this->remove($item);
}
return $this;