the code is as follows
$num = M ("log")-> where ("date_format (create_time,"%Y-%m") =" $date"")-> count ("id");
for($i = 0; ($i+5000)<=20000;$i += 5000){
$datas = M("credit_log")->where("date_format(create_time,"%Y-%m") = "$date"")->limit($i,$i+5000)->select();
echo $this->convert(memory_get_usage(true))."<br/>";
unset($datas);
//sleep(5);
}
after several cycles, the memory overflowed. Why did the memory overflow occur? Because the unset function does not free memory?