Search code examples
delphimemory-leaksfastmm

Delphi: memoryleak in IdStack, but who uses IdStack?


FAstMM reports a memoryleak from a TIdCriticalSection in IdStack.pas. I understand this is a intentional leak, that is documented in the code.

What I do not understand, is why IdStack is included in my project. How can I find out what unit pulls it in?

Is there a way of excluding this leak from the report, using the version of fastmm that comes with delphi 2007?

UPDATE: Is there a way of finding all the pas-files included in a build?


Solution

  • All Indy units have an 'Id' prefix, so check if you have any of those in your uses clauses.

    Another way might be to place a breakpoint in TIdStack.create(). Eventually, the guilty one will show up in the call stack.