View Single Post
 
Old 06-15-2014, 06:44 PM
whatsup whatsup is offline Windows 7 64bit Office 2010 32bit
Competent Performer
 
Join Date: May 2014
Posts: 137
whatsup will become famous soon enough
Default

Bob, I'm erasing set object variables from memory manually out of two reasons:
- Variables created within a macro should be erased from memory automatically once the macro is done. With set objects in former times it didn't always work this way and you were left to an error of stackoverflow in the worst case or to a poor performance. Since I don't know if the problem is fixed, I just continue erasing them manually.
- The main reason: There are different types of objects, for instance classes you must unload manually; if creating a new instance of an object (whenever using the keyword "New") you have to unload it manually as well - even more important because depending of the object it might use huge capacity in memory. Now, tell me are there more? Lazy as I am, I don't want to think about it neither look it up, but destroy each of them manually once they did their job. And it's not a big deal to write the additional instructions.
Reply With Quote