Greg Hains Posted November 15, 2010 Posted November 15, 2010 Hi. During the course of the scripts throughout a session, I have quite a number of variables set to parse values between tables etc. Being the kind of programmer I am, I prefer to clean up after myself and remove and non-essential debris. Although variables wouldnt consume much RAM (especially given how much RAM computers have these days), but is there any way (or need to) remove a variable once it's job is done? Simple housekeeping really. Cheers, Greg
comment Posted November 15, 2010 Posted November 15, 2010 Script variables - i.e. variables prefixed by a single $ and declared during script runtime - are automatically cleared when the script terminates.
Greg Hains Posted November 16, 2010 Author Posted November 16, 2010 Hi Comment, Thanks for your response. No only was I not clear, but realised what my question really came down to. I meant to be discussing global variables - I failed to mention that. I would pass them between different modules in different scripts so would need to be global to do the job. Is there anyway to clear global variables? Not just empty the contents, but remove them from memory? Cheers, Greg
comment Posted November 16, 2010 Posted November 16, 2010 Any variable that is set to empty ceases to exist. However, the purpose of global variables is to persist - perhaps you should consider script parameter and script result for exchanging values between scripts.
Recommended Posts
This topic is 5122 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now