GSto is right ... Only a garbadge PHP builder can free memory. unset () a variable or setting it to NULL can speed up the process of collecting "garbadge collect" (at the price of processor cycles), but there is no way to directly free some memory (à la C ++, where "delete" will actually free memory).
I asked a similar question a while ago on the forum, and this is what I got:
From Fou-Lu @ codingforums.com:
, (, mysql_free_result). , , . , . , gc , . , , , , , script ( ). unset , gc . , , , HashMaps C , , . , GC , zval, , ( , ).
http://www.codingforums.com/showthread.php?t=184164