stevepac
15 years agoOccasional Contributor
Is there any code that I could use to clear memory?
I have been trying to write a little script for testing a windows mobile software and I have noticed that whenever the script does something, the memory usage of testcomplete 7 keeps increasing and crashes eventually. The following is a little example using bubble breaker.
function Main()
{
Log.LockEvents();
var BB = WinCETestedApps.BubbleBreaker.Run();
while (true)
{
BB.Refresh();
var picture = BB["Window"]("Bubble Breaker").Picture();
}
}
For each loop, the memory usage keeps increasing until it reached 1.6gb and finally crashed.
I even turned off events to see if it was the log that keeps building up but it wasn't.
I also tried the above code with an windows application and seems that the memory usage does not increase as much as when run on a windows mobile application.
Is there any particular reason for this or is it just a memory leak problem that needs to be fixed?
Is there any code that I could use to clear memory?
Thanks