Memory leaks in Delphi's code might not be memory leaks at all. They might represent objects kept in memory for the life of the program that use the side-effect of closing the program to free the associated memory. I also use a similar technique for all kinds of global (singleton) objects. I create them but never free them.
About leaked memory staying in memory or getting swaped to the hdd: The OS will normally swap memory to disk when it needs to allocate memory to an application and it no longer has memory available. When in needs to do that it will first try to swap out memory that hasn't been used for a while - so truly leaked memory has a good chances of going down to the HDD. Keep in mind that the OS allocates memory in "pages", not "bytes" - so your leaked memory might stay in memory because it shares page with useful memory or as a side-affect of heap-management. CubicDesign wrote: > Hi. > > I used today a tool to check my app for memory leaks. > > I've found 2 in my code and other 20-30 more in Delphi's code (Delphi 7.1). > They are not so big. The biggest is 4096 in System.pas. Should I close > my eyes and go on. > I mean the leaking in pretty small. > > There is a second question: what happen with a leaking? It is that piece > of memory stored to the swap file or it stays forever in memory? > I know that Window 'downloads' the applications that are not used for a > while to swap to make some room in RAM. > Will be the leaked memory moved to swap also? In this case not even a > big leaking will be too harmful for the system's performances. > _______________________________________________ > Delphi mailing list -> [email protected] > http://www.elists.org/mailman/listinfo/delphi > > _______________________________________________ Delphi mailing list -> [email protected] http://www.elists.org/mailman/listinfo/delphi

