I have an old Doc/View C++/MFC app that is developed using VS 6. I use Stingray Objective Grid 8.01 Pro as my data grid.
Recently, our "job" sizes have gotten much larger; and this is when the Out of Memory errors started showing up.
Here is the scenario that gives me the out of memory error:
FYI, when I say I load a job in the scenario below; it means that I read a DB and load the data associated with that job into memory using custom classes that hold the data in CArray and CList objects; which is stored in the document class. In addition, I store some of that data in two StingRay grids on the main View for that document.
When I first open the application, it shows about 21 MB memory usage in Task Mgr. I start by loading a typical job and the app goes to around 40 MB. I then load a "large" job and then application grows to around 159 MB. Next, I close the "large" job and the application drops to around 40 MB. I then load the same "large" job again and it goes back to around 159 MB. I then open a modeless window that contains a StingRay grid and fill the grid with data from the job. When that is doen, the application memory usage jumps to around 1,421 MB. I then close the modeless window and it goes back to around 163 MB. I then close the "large" job and it goes back to around 45 MB. I then try to reopen the same "large" job and when I starting reloading the Stingray grids on the main window (not the modeless window), I get an Out of Memory error. At that point, the application is showing about 170 MB in Task Manager.
Since I can close and reopen jobs without any issue, I can only assume that when I am loading the data into the Stingray grid in the modeless window; that something is not getting freed; but if that is the case, why is my memory usage in Task Manager seem to be going back to a nearly normal level after I close the modeless window. It is only about 5 MB larger after I close the modeless window.
What I really need is some suggestions on how to try and identify why I am getting this out of memory error when my app has only used 160 MB when it says out of memory.
Any help would be appreciated.
Thanks,
Phil