On Jan 24, 2025 at 2:10:53 AM, Santi via fpc-pascal < fpc-pascal@lists.freepascal.org> wrote:
> procedure foo() > var > s1: TStringList; > s2: TStringList; > s3: TStringList; > begin > s1:=TStringList.create; > try > s2:=TStringList.create; > try > s3:=TStringList.create; > try > doWhatever(s1,s2,s3) > finally > s3.free; > end; > finally > s2.free; > end; > finally > s1.free; > end > end; Honestly this is the worst memory management strategy I've seen in any language. It's more keywords than code! It was Delphi’s idea right? If you’re making some UI app in 2025 a garbage collector or full ARC is perfectly fine so I don’t see how they get away with selling this. Regards, Ryan Joseph
_______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal