我在Raspberry Pi上制作网络界面,由于其有限的资源,我需要获得尽可能多的免费ram。我的问题是,如果在每个php页面的末尾运行unset($someClass)
以获得某些内存或者只是浪费时间,是否有任何好处?
示例:
<?php
session_start();
$fh = new FileHandler();
// .. lots of code
$fh->classFunctionUsage($blabla);
// .. more code and then the end of the file
// should i do:
unset($fh);
// .. or not ?