[fpc-devel] compile time memory leak detection
ik
idokan at gmail.com
Tue Jan 19 10:09:21 CET 2010
http://ik.homelinux.org/
On Tue, Jan 19, 2010 at 10:59, Marco van de Voort <marcov at stack.nl> wrote:
> In our previous episode, ik said:
> > 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 ?
>
> Is this a suitable task for a compiler? Maybe it is a task better suited to
> an external profiler.
>
Well I find myself forgetting from time to time to close allocated memory on
a local variable, and a nice warning can make it easier to figure out then
running code and finding it after x amount of execution time (and using the
feature that uses that code).
So, I do not know if it's really a compiler task, but it sure can help :)
> _______________________________________________
> fpc-devel maillist - fpc-devel at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-devel
>
Ido
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20100119/97f08b48/attachment.html>
More information about the fpc-devel
mailing list