How does using the Wait statement in QTP affect memory, in particular the RAM. During the wait does the process go to sleep, and thus deallocate its use of the RAM? Or does it still hold on to its memory?
Our application has a for loop. During this loop if you watch the memory use using the task bar it skyrockets. If we add wait() statements into the for loop, the execution time (obviously) deteriorates, but the memory use (at least according to the task bar) seems to be improved. Our team has two theories as to why this is happening, and no way to determine which is correct. One theory is that the waits give vbScript's garbage collector (which runs after every line) more time to run, thus freeing more memory. The second theory is that what we are observing is the process going to sleep and that while it is asleep, it allows other processes to use the memory that it would be using if we continued allocation.
Any suggestions as to which theory is correct, or how to show which theory is correct?
Thanks.
Our application has a for loop. During this loop if you watch the memory use using the task bar it skyrockets. If we add wait() statements into the for loop, the execution time (obviously) deteriorates, but the memory use (at least according to the task bar) seems to be improved. Our team has two theories as to why this is happening, and no way to determine which is correct. One theory is that the waits give vbScript's garbage collector (which runs after every line) more time to run, thus freeing more memory. The second theory is that what we are observing is the process going to sleep and that while it is asleep, it allows other processes to use the memory that it would be using if we continued allocation.
Any suggestions as to which theory is correct, or how to show which theory is correct?
Thanks.