Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Delphi 7.0 and memory leak?

After spending time with FastMM4 in weeding out any pieces of code that could possibly cause memory leak as indicated by FastMM4, we have been test running our software for about a month non-stop on Windows 7. This is what I am seeing so far in the Task Manager for my software process.

> -CPU started out at 1% and 0%. Now it is bouncing around from 2% to 5%
> -VM usage started out at 11,852KB. Now it is at 4,900kb but bouncing
> around from 4,900kb to 5,000kb.

Does this mean we have memory leak in our software? I am confused and concerned.

Thanks in advance,

like image 543
ThN Avatar asked Dec 17 '22 15:12

ThN


1 Answers

That sounds like pretty normal memory usage. The program does something that needs memory, and memory usage goes up. The program gets done with what it's doing and releases the memory, and memory usage goes back down. A memory leak is when memory usage goes up and keeps going up because you're not releasing the memory once you're done with it.

If you've got FastMM4, you shouldn't have to hunt around for things that might possibly cause a memory leak. Just turn on Full Debug Mode and the logging option and it will find any memory that leaks when you run it, and write out a file with types and stack traces for you.

like image 63
Mason Wheeler Avatar answered Dec 21 '22 09:12

Mason Wheeler