What's the best way to process something in bulk when using iterator e.g.
$foos = $model->findAll();
foreach ($foos as $foo) {
if (foo) {
$existed++;
} else {
$model->deleteOne($foo);
$removed++;
}
unset($foo);
}
unset doesn't seem to do anything. And the memory just keeps going up.