Skip to content

Commit

Permalink
Improve memory usage at Query/Builder/chunkById (#19369)
Browse files Browse the repository at this point in the history
* Improve the usage of memory

* StyleCI

* StyleCI
  • Loading branch information
driade authored and taylorotwell committed May 28, 2017
1 parent 21f7240 commit bd8cc3d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Illuminate/Database/Query/Builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -1863,6 +1863,8 @@ public function chunkById($count, callable $callback, $column = 'id', $alias = n
}

$lastId = $results->last()->{$alias};

unset($results);
} while ($countResults == $count);

return true;
Expand Down

0 comments on commit bd8cc3d

Please sign in to comment.