

- #Delphi xe findinfiles how to#
- #Delphi xe findinfiles manual#
- #Delphi xe findinfiles full#
- #Delphi xe findinfiles code#
#Delphi xe findinfiles how to#
#Delphi xe findinfiles manual#
INC files and manual configurations to make it work, which might not be comfortable for some users.īut all in all, is a great tool, the “standard” tool to get memory leaks in Delphi. And even though it has lots of features, to use it you have to deal with.
#Delphi xe findinfiles full#
You also have to use a DLL for the full debugging features it’s not cross-platform: it only officially works for Windows (it looks like a macOS version is available in the official repo, but I never tried it). To do that, you have to use the full FastMM4 version, available on the FASTMM4 public GitHub repository.
#Delphi xe findinfiles code#
It doesn’t have all the nice debugging tools you need (to know, for example, where in the code your leaked memory was allocated).

So, if it’s built-in, default, works, why don’t we finish this article here, then? Well, there are some gotchas.ĭelphi includes a stripped out version of FastMM4. I don’t even know why this is not added by default in Delphi, at least wrapped by a directive. If there are leaks at the end of your application, a dialog will be displayed showing all the leaks.Īll Delphi developers should add that line to their applications. Since FastMM allocates and deallocates memory in your application, who else is better to report the blocks that have not been deallocated? All that it takes to start working with it is add a single line in your project: ReportMemoryLeaksOnShutdown := True Īnd voilà, your application will report all memory leaks when it shuts down. The reason is simple: it’s the default memory manager in Delphi, so it’s already built-in and ready to use. Detecting and fixing a memory leak in Windows will help even more that your non-Windows applications will not have memory leaks as well.įastMM (or to be more specific, FastMM4) is the de-facto standard tool to detect memory leaks in Delphi. Pointing out that memory management is unified just means that these tools are even more relevant than ever. The humble purpose of this article is to be a definitive and up-to-date list of all tools that you can use to detect memory leaks in Delphi applications. The “old” (still valid when I’m writing this article) ARC mechanism also had its problems, and in my opinion harder to detect, like dealing with cyclical references.īut well, enough with this too long introduction.

It’s also important to note that this doesn’t necessarily mean “more leaks” in mobile platforms. A unified memory management has been promised since last year, and it looks it has arrived.Īs everything in life, this change isn’t 100% good or bad, there are pros and cons in it, but one thing is clear: the way memory is managed now is the same in all platforms, so the ways to detect memory leaks in different platforms are more similar now.

With the upcoming release of Delphi 10.4 version, this will become even more relevant. I’ve written about it before, stressing that in server applications like the ones built with TMS XData this is even more important. Detecting memory leaks is a very important task in Delphi development.
