On 20.09.2014 06:36, Fabrício Srdic wrote:
Hello,

In platforms with managed code (.NET, Java), objects are automatically
freed by the memory manager / garbage collector.

Would not it be interesting to have a similar feature in FPC?

For example, through a root class where its objects are counted by
reference, like the TInterfacedObjects.Thus, the programmer would be
free from having to manually release objects.

It's already on my radar since Delphi's NextGen compiler introduced ARC (Automatic Reference Counting) for TObject and its descendants.

Though while I'd like to implement them I don't consider them the holy grail especially since the programmer needs to take care of cycles in the objects (Delphi solves this by allowing the programmer to declare fields, paremeters and such as "weak", thus not changing the reference count).

Regards,
Sven

_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Reply via email to