note 86347 added to function.unset

From: Date: Tue, 14 Oct 2008 12:50:34 +0000
Subject: note 86347 added to function.unset
Groups: php.notes 
Request: Send a blank email to php-notes+get-145340@lists.php.net to get a copy of this message
unset() does just what it's name says - unset a variable. It does not force immediate memory freeing. PHP's garbage collector will do it when it see fits - by intention as soon, as those CPU cycles aren't needed anyway, or as late as before the script would run out of memory, whatever occurs first. If you are doing $whatever = null; then you are rewriting variable's data. You might get memory freed / shrunk faster, but it may steal CPU cycles from the code that truly needs them sooner, resulting in a longer overall execution time. ---- Server IP: 82.177.164.100 Probable Submitter: 193.164.157.81 ---- Manual Page -- http://www.php.net/manual/en/function.unset.php Edit -- https://master.php.net/note/edit/86347 Del: integrated -- https://master.php.net/note/delete/86347/integrated Del: useless -- https://master.php.net/note/delete/86347/useless Del: bad code -- https://master.php.net/note/delete/86347/bad+code Del: spam -- https://master.php.net/note/delete/86347/spam Del: non-english -- https://master.php.net/note/delete/86347/non-english Del: in docs -- https://master.php.net/note/delete/86347/in+docs Del: other reasons-- https://master.php.net/note/delete/86347 Reject -- https://master.php.net/note/reject/86347 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#145340) next »