[fpc-pascal] Freeing memory with exceptions

Michael Van Canneyt michael at freepascal.org
Mon May 22 23:06:04 CEST 2023



On Mon, 22 May 2023, Benito van der Zander via fpc-pascal wrote:

> Hi,
>
>> 
>> The compiler will do this wrapping anyway if you use ansistrings, so the
>> approach with e.g. a generic record will not cause a lot of overhead in 
>> most
>> cases. 
>
> But using strings or anything similar causes a lot of overhead
>
> It is really bad

Depends on your code.

Nobody forces you to use ansistrings or unicodestrings. 
You can perfectly write your own library for string management if you are
so inclined.

But I for one am grateful that I don't need to bother with memory management for
strings, except perhaps on special occasions.

So I think it is really good.

Michael.


More information about the fpc-pascal mailing list