PDA

View Full Version : clear memory?


fbitonti
11-13-2006, 04:51 AM
Is there a function that will clear all the variables I have in a script? Basically clear the memory and start all the variables from scratch.

large-x
11-13-2006, 07:13 AM
From what I've heard and know of, no. You can however wrap everything in { } which will contain it to a that scope instead of a global scope.

cpan
11-13-2006, 11:31 AM
yep it's best to work as much as possible localy, as the respective vars/procs aren't kept in memory after the code execution finishes.

also there is the clear command to manualy clear variables (use clear $var)

Robert Bateman
11-13-2006, 04:06 PM
clear only resizes arrays to zero, it doesn't delete the variable.

CGTalk Moderation
11-13-2006, 04:06 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.