todayme Posted March 2, 2007 Share Posted March 2, 2007 I am not formiliar with PHP do you need to wip an array from memory after use, or does the language do it its self? If you do have to wip the array so as not to keep a hold of memory how would you do it? Quote Link to comment Share on other sites More sharing options...
itsmeArry Posted March 2, 2007 Share Posted March 2, 2007 use unset($array); Quote Link to comment Share on other sites More sharing options...
todayme Posted March 2, 2007 Author Share Posted March 2, 2007 use unset($array); Do you have to do this with variables as well? Quote Link to comment Share on other sites More sharing options...
simcoweb Posted March 2, 2007 Share Posted March 2, 2007 Check this out: http://us3.php.net/unset Quote Link to comment Share on other sites More sharing options...
itsmeArry Posted March 2, 2007 Share Posted March 2, 2007 yup u can do it with array or variables both Quote Link to comment Share on other sites More sharing options...
btherl Posted March 2, 2007 Share Posted March 2, 2007 When your script finishes, all memory used by it will be freed. So for most scripts, you will not need unset() Also, variables created and used inside a function will be freed at the end of the function (unless you have made them accessible outside the function, by returning them or putting them in a global variable) Usually I only consider unset() if my script actually does run out of memory. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.