4 ms·
> But memory handling is something that does not fit my vision. Note that in practice memory management is almost never an issue with FreePascal since a lot of
by badsectoracula 8y ago
> But memory handling is something that does not fit my vision.
Note that in practice memory management is almost never an issue with FreePascal since a lot of things are based on TComponent that provides an ownership-based model and dynamic arrays (at the language level) handle a lot of cases you'd need to worry yourself. Of course if you create raw objects you also need to release them, but this is something you generally do in constructors and destructors.
> I would hope for something similar to Swift - automatic reference counting.
I'm not sure how i feel about this personally since i think it adds a lot of hidden baggage to the language, but you can use reference counting using "COM" interfaces (the name is just a historic artifact, they work in non-Windows environments too) in current FPC. There is also work to allow any custom type become reference counted by defining some special operators (essentially functions) that the compiler will automatically call to incref/decref/etc (which can also be used to implement RAII).
> With ARC I can forgive even the manual UUIDs for components.
Is the manual UUIDs you are talking about in Swift? AFAIK you do not need to define any UUID in FreePascal (except for the COM interfaces mentioned above).