2 ms·
Note that Free Pascal does have automatic reference counting for interfaces, although it is not a good idea to use it for memory management because (like with D
by badsectoracula 10y ago
Note that Free Pascal does have automatic reference counting for interfaces, although it is not a good idea to use it for memory management because (like with Delphi) it is very easy to pass around an instance that isn't counted and end with memory leaks.
However one of the compiler's designers has an experimental branch which allows you to mark classes as being automatically managed and any instance and use of those classes becomes reference counted. So at some point it might become part of the main compiler (although it is probably far from now since AFAIK it isn't something people really ask for from FPC and there are other things to do).