Marco Cantù has pointed out in his blog (http://blog.marcocantu.com/blog/delphi-blog-week-60.html?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+marcocantublog+%28marcocantu.blog%29) something really important for the Firemonkey mobile developers. As far as I know, this is the first multiplatform memory leak detector (tested for Android, Win32, Win64) that exists for Delphi: https://bitbucket.org/shadow_cs/delphi-leakcheck.

Marco Cantù has pointed out in his blog (http://blog.marcocantu.com/blog/delphi-blog-week-60.html?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+marcocantublog+%28marcocantu.blog%29) something really important for the Firemonkey mobile developers. As far as I know, this is the first multiplatform memory leak detector (tested for Android, Win32, Win64) that exists for Delphi: https://bitbucket.org/shadow_cs/delphi-leakcheck.
Thanks Jan Rames for your contribution to the Delphi community.
https://bitbucket.org/shadow_cs/delphi-leakcheck

Comments

  1. I forgot to comment that mobile and Linux compilers memory management is ARC based. For this reason, you need to test for memory leaks in all platforms.

    ReplyDelete
  2. Compiles OK in Delphi Tokyo 10.2.3, and seems to work OK for Windows, however when using the Sample app for Android, it crashes when using the Exit button, and does not seem to report anything

    ReplyDelete
  3. David Nottage I found this on the Readme

    Known issues

    On Android (or actually any platform that needs libicu) the program may cause SEGFAULT during System unit finalization. This is caused by System allocating some memory before the memory manager is initialized and not freeing it properly (there are more comments in the LeakCheck source code). This should now be prevented in cases when the application doesn't leak any memory.

    ReplyDelete
  4. FWIW, I did get leak reports on Android for empty FMX application, but either I didn't configured it correctly, or FMX itself is leaking so much that results were unusable. Like trying to find a needle in a haystack.

    ReplyDelete
  5. I really do suggest to perform your leak checking during unit testing which makes the report much easier to read. I don't have access to newer Delphi that's why I didn't include them in the read me, it is written in pure Pascal so any Delphi with necessary features should be supported future versions inckuded unless RTL gets changed dramatically (some minor changes may be required if another platform is added). I also plan to refactor the wiki into multiple pages as soon as I have some time to spare. I think it is difficult to consume it as it is right now. To discover your own leaks I suggest to enable stack tracing and possibly graph logging so you can trace your leaks and ignore others.

    ReplyDelete
  6. Honza Rameš Well, of course ;)

    Still, that does not help much if you want to hunt down GUI leaks. And those are really #!$@%!?? ones.

    ReplyDelete
  7. Dalija Prasnikar this is where the leak graph should come in handy. LeakCheck offers cartain features that might help you in these complex scenarios like creating a snapshot and creating a leak diff between current state and the snapshot. But the general idea is that the framework you are using does not leak, if this isn't true hunting your leaks becomes a PITA.

    ReplyDelete

Post a Comment