+
95
-

php cli编写常驻内存应用如何避免内存一直狂增?

php

请问php  cli编写常驻内存应用如何避免内存一直狂增?

网友回复

+
15
-

常见的就是内存变量用完后释放,$s=null 示例代码如下:

<?php  
$s = str_repeat('1',1024);   
$b = &$s;  
  
$m=memory_get_us...

点击查看剩余70%

我知道答案,我要回答