[fpc-pascal] Freeing memory with exceptions

Sven Barth pascaldragon at googlemail.com
Tue May 30 23:34:15 CEST 2023


Steve Litt via fpc-pascal <fpc-pascal at lists.freepascal.org> schrieb am Di.,
30. Mai 2023, 21:57:

> I don't know about other operating systems, but on Linux a crashed
> program gives up all its memory, even leaked memory, upon termination,
> so I'm not sure why this attention to memory leak on abnormal
> termination is even necessary.
>

An exception does not have to end with the program's termination. And if
the program does not terminate due to an exception it makes sense to avoid
memory leaks as the program might be long running.

Regards,
Sven

>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20230530/8be6e365/attachment.htm>


More information about the fpc-pascal mailing list