mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
ENH: RemoveAll() memory performance enhancement.
This commit is contained in:
parent
35d5f16286
commit
26d59944e0
@ -1174,7 +1174,7 @@ class DataList extends ViewableData implements SS_List, Filterable, Sortable, Li
|
|||||||
*/
|
*/
|
||||||
public function removeAll()
|
public function removeAll()
|
||||||
{
|
{
|
||||||
foreach ($this as $item) {
|
foreach ($this->getGenerator() as $item) {
|
||||||
$this->remove($item);
|
$this->remove($item);
|
||||||
}
|
}
|
||||||
return $this;
|
return $this;
|
||||||
|
Loading…
Reference in New Issue
Block a user