Inconsistant memory usage at startup
Posted on 2006-06-27
I have an WIN32 application made with Delphi 6. It's used about 27 Mb of memory at startup but sometime, the memory usage peak at 60, 100 and even 160 MB in Task Manager. After Initializing, the App create a DataModule, who itself instantiate some customs Classes, and create the MainForm (in full screen). Nothing special worth for posting here anyway i think. It have no specific patern for the memory peak since it happen sometime two time in a row or after four normal memory usage startup. There is no slowdown either (AFAIK) using the app even if it's mem is at 160MB.
Why would a thing like this crappy memory peak happened?
And how did i find wich component used this much memory?
I tried InstanceSize but it look like it didn't return the global size of my object and it would be too long to calculate it for every object i created.
I have tried to delete most object creation and use breakpoint to see where in the code the memory seem to rise but since it happen at random, i really got hard time to reproduced it!
Any suggestion? Third party software who may help? Maybe i look at the problem the wrong way...
Thanks for any clue!