Skip to content

Commit

Permalink
ENH: RemoveAll() memory performance enhancement.
Browse files Browse the repository at this point in the history
  • Loading branch information
mfendeksilverstripe committed May 12, 2022
1 parent 35d5f16 commit 26d5994
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ORM/DataList.php
Expand Up @@ -1174,7 +1174,7 @@ public function shuffle()
*/
public function removeAll()
{
foreach ($this as $item) {
foreach ($this->getGenerator() as $item) {
$this->remove($item);
}
return $this;
Expand Down

0 comments on commit 26d5994

Please sign in to comment.