davej Posted October 11, 2013 Share Posted October 11, 2013 Should any extra thought go into trying to avoid the use of local variables inside event handlers? I see some people seemingly do that. I don't know how quickly or efficiently trash collection works but for small variables I would not expect it to be an issue worthy of consideration. Link to comment Share on other sites More sharing options...
justsomeguy Posted October 11, 2013 Share Posted October 11, 2013 There's nothing wrong with using local variables anywhere. Link to comment Share on other sites More sharing options...
Ingolme Posted October 11, 2013 Share Posted October 11, 2013 When the event handler is called, local variables are created. When the event handler finishes executing the variables are destroyed. No memory leaks or efficiency problems. 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