[fpc-devel] Why/how does the compiler have a non-trivial number ofmemory leaks after over two decades of development?

Mattias Gaertner nc-gaertnma at netcologne.de
Mon Jul 30 15:19:53 CEST 2018


On Mon, 30 Jul 2018 14:36:10 +0200 (CEST)
Michael Van Canneyt <michael at freepascal.org> wrote:

>[...]
> Many people will probably be surprised, but the use of try/finally 
> is not required for an application:
> 
> Gradually, some parts of the compiler were switched to classes, but even
> then, without exceptions: As long as you do not use the sysutils unit,
> (which was the case for many years for the compiler) exceptions will 
> not be raised, and so there is simply no need for try/finally blocks.

Many people will probably surprised, that try/finally/except works
without sysutils and try/except does not need "Exception". It
works with any TObject.

 
> Probably it would be better to remove the dependency on sysutils, to keep
> the compiler free of try/finally blocks.

Sysutils has nothing to do with creating exception frames.

Mattias



More information about the fpc-devel mailing list