在课堂上使用php unset释放ram

时间:2016-03-14 20:55:16

标签: php optimization unset

我在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 ?

0 个答案:

没有答案