[fpc-devel] compile time memory leak detection
Jonas Maebe
jonas.maebe at elis.ugent.be
Tue Jan 19 10:31:17 CET 2010
On 19 Jan 2010, at 09:35, ik wrote:
> There are sometimes way to "see" that you have memory leak in a code
> without
> using any sort of profiler.
> For example using new/getmem on a local variable without releasing
> it etc...
>
> Does FPC know how to find this places on compile time and at least
> issue a
> warning about it ?
No, it doesn't. In principle, the compiler can't even be sure that you
haven't replaced the default memory manager with e.g. some garbage-
collector-style memory manager similar to Boehm GC, in which case such
warnings would be wrong.
Jonas
More information about the fpc-devel
mailing list