I’m struggling at the moment with an application that runs continually and generates documents every few minutes. A timer kicks off a batch process of generating the documents and then waits a few minutes before going again.
In the live environment, the memory usage of the application climbs until eventually it crashes. I’ve been going through the application with a fine tooth comb trying to discover where I might be causing the leak but to no avail. I’ve tried parring back the code until I find the offending line or routine that I think causes the problem and I’ve even got down to a line of code that when comment it out, stops the leak. (It’s was a FolderItem.CreateAsFolder call). But when I then bring back other parts of the application, the leak goes off again. And if I create a test app to hammer the CreateAsFolder call, there’s no leak.
I’ve tried creating a test application so I can show the Xojo guys but what I’ve found is, it only happens as you increase the load on the application. So I can run one part of the application over and over with no leak. I can run a second part over and over with no leak. But, when I run them together, off it goes. The 2 parts do not share any objects or routines so I’m at a loss as to what’s going on.
Has anyone else had any experience of this or got any suggestions about how I can find out what the issue is?
I have the test application available if anyone is interested.
Thanks in advance.