Op 24-1-2025 om 07:56 schreef Sven Barth via fpc-pascal:
Hairy Pixels via fpc-pascal <fpc-pascal@lists.freepascal.org> schrieb
am Fr., 24. Jan. 2025, 06:16:
Feels to me like manual memory management and exceptions don’t mix
well. I use exceptions in C# and Swift and they don’t require all
this boiler plate to prevent memory leaks.
Don't know about Swift, but C# uses garbage collection, so of course
you won't see resource protection blocks there... 🙄
Not to avoid memory leaks, but you do need jump through hoops to get
scarce resources deallocated (IIRC implement IDisposable, and hope that
it gets called in time). Delphi.NET used a lot of IDisposable.
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal