I have built a stand alone application that on launch will pop up it's front panel, and wait for the user to click the run button.
If i look in Task Manager, i see the .exe is present and has memory allocated to it.
If i do nothing (do not click the run button), and leave the application window open, the memory allocated (as seen in Task Manager) increases (about 3mb over 24 hrs). -note, the .exe is not actually 'running' my code, as the run button has not been clicked.
1, is this normal?
2, is there anything i can do to stop it?
3, is this down to my coding? (-would seem not as my part of the .exe does not run until the run button is clicked by the user?)
I do not have experience with memory & windows handling of it.
I understand the concept of a memory 'leak' -increasing memory due to continually incremented arrays etc.
Note, i am running the Execution Trace Toolkit, and it is enabled in the .exe.
LV 2011, SP1, WIn XP. (going to upgrade soon, but have held it static as a dev platform...)
1, is this normal?
No it is not. An application needing to click run before it works, is not normal. Open Microsoft Word, does it run? Do you need to click a run button? Other programs do not behave like this and neither should yours.
That being said I don't think this memory increasing by not running is normal, but I have never seen it and maybe that's because my program is either running or not. It is never in limbo where it is running but not doing anything.
The reason for it starting, but not running is so that the Execution Trace Toolkit can see the .exe before it starts, so i can capture all the events involved with the startup of the .exe
You cannot set the ETT running until it sees the .exe. For the .exe to be seen by the ETT it needs to be 'loaded' (double click on the icon) but not necessarily running (clicked on the run arrow).
Q1 in my original post was referring to the memory behavior in this configuration, not if it was acceptable to have an executable that required the run button to be clicked.
This particular application, when deployed in the field, starts as the host PC boots, and quits as it is shut down, so is running the duration. -without the menubar shown, and without the ETT component & server present/enabled.
The reason for the ETT is that the memory allocated to the .exe, as reported by Task Manager on the deployment machine, increments up. So far the memory events reported by the ETT all seem to tally, which is why i am looking wider to try and identify the cause.
There is no obvious reason I can think of as to why this might be happening. The best way to find the cause would be by eliminating portions of your code to see if you can identify the culprit. Would it be possible for you to post the simplest piece of code in which this issue can be seen?
Thanks and Regards,