Memory leak detection and use of third party utilities
Posted on 2009-04-01
I have a commercial app written in D5 which is leaking memory over time depending on how busy the application is processing. I have used both Memchk and Eurekalog to try and pin down the cause, but am a bit confused with regard to the results...
In order to familiarise myself with Eureka log, I wrote a simple test app which would create a stringlist on a button click, without freeing the object afterwards. If I click the button 5 times, then Eurekalog reports "Memory Leak: type TStringlist; total size=240 Count=5 -- i.e. it reports the number of times the suspect object is created and not freed. In my commercial app however, I can have it process (records from a Zeos dataset) either 5 records or 5000 records and the "Count" values in the Eurekalog remain the same (i.e. there is no instance of 5 or 5000 in any of the Count fields) and total memory leak value remains about the same at approx 1Mb -- therefore I have to presume that after the initial reported memory leaks (system.pas, Classes.pas, ZList.pas, ZQuery.pas) there is no further loss on that object.
Therefore, how can I trace why the app is losing approx 25 Mb every 10 hours?