cbadal Posted March 13, 2008 Share Posted March 13, 2008 I have an AutoIt program that does a lot of string processing. I create many, many strings. So my question is "When does cleanup occur"? 1. When my function exits, do all of the strings I created locally get freed up? 2. Or does that memory get cleaned up only when the program exits? If it' #1, then I'll leave my code alone. But if it's #2 I may consider cutting down on my string creation. Link to comment Share on other sites More sharing options...
Richard Robertson Posted March 13, 2008 Share Posted March 13, 2008 When you set a variable equal to something, it's previous value is freed, according to it's type. If the variable is local, it will also be freed at the end of it's scope. Anything declared globally will be freed on exit. Link to comment Share on other sites More sharing options...
Recommended Posts
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