[fpc-devel] Class management operators
ryan at thealchemistguild.com
Fri May 24 19:00:09 CEST 2019
> On May 24, 2019, at 10:44 AM, Anthony Walter <sysrpl at gmail.com> wrote:
> Ryan, I believe the compiler already has management support for complex types. That is for BOTH records and classes. All that is required is you have a supported version of the compiler and you add the sugar in the form of AddRef, Initialize, and Finalize. See this page for more information:
Exactly, it’s already there it’s just not supported for classes until a little extra work is done (even interfaces use it). I guess it’s under scrutiny now but I just made some changes so management operators work for old-style objects and noticed it would be fairly trivial to add support to classes also. Not sure why this wasn’t done in the first place because it makes ARC style memory management possible without record wrappers and default properties.
More information about the fpc-devel