[fpc-devel] Class management operators

Ryan Joseph ryan at thealchemistguild.com
Sun May 26 16:03:06 CEST 2019



> On May 26, 2019, at 4:02 AM, Sven Barth via fpc-devel <fpc-devel at lists.freepascal.org> wrote:
> 
> Thus, if we would decide to implement ARC for classes we would integrate directly inside the compiler, cause there would be no need for user management (Create and Destroy have the role of the Initialize and Finalize operators). An experiment for this you can see in my old ARC branch which used a keyword (and had similar problems for passing to non-ARC classes, though it allowed to manually increase/decrease the reference count as well): https://svn.freepascal.org/cgi-bin/viewvc.cgi/branches/svenbarth/arc/

Oh ok, I thought the management operators were basically just making a single additional call to the class method and were basically the same as ansistring ref counting. It looks like there is a main dispatch function (fpc_Initialize for example) that routes to variety of different functions based on the type and could simply be extended like it was for records. I liked the idea of management operators for classes because users can opt in for classes that aren’t doing performance critical stuff.

Regards,
	Ryan Joseph




More information about the fpc-devel mailing list