[fpc-pascal] Freeing memory with exceptions

Sven Barth pascaldragon at googlemail.com
Thu May 25 10:48:41 CEST 2023

Mattias Gaertner via fpc-pascal <fpc-pascal at lists.freepascal.org> schrieb
am Do., 25. Mai 2023, 08:23:

> On Thu, 25 May 2023 07:55:39 +0200
> Sven Barth via fpc-pascal <fpc-pascal at lists.freepascal.org> wrote:
> >[...]
> > But this is what "managed type" *means*: that the compiler and RTL
> > will make sure that it's correctly freed as long as nothing
> > unexpected happens.
> ... and exceptions are expected.

Depends on the circumstances: in code with disabled implicit exception
frames, but managed types exceptions are to be considered unexpected. But
otherwise they are indeed expected.

> Maybe better: As long as the user does not break the rules.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20230525/10fe9e45/attachment.htm>

More information about the fpc-pascal mailing list