[fpc-pascal] A serious Memleak using delegates/implements (was: Delegate Interface class does not seem to be referenced counted)
Tony Whyman
tony.whyman at mccallumwhyman.com
Thu Oct 6 00:16:22 CEST 2016
On 05/10/16 23:03, Graeme Geldenhuys wrote:
> Martin Schreiber recently mentioned in another Interface discussion that
> there is a very good reason he doesn’t use COM style interfaces…
> Reference Counting!
Used properly reference counted interfaces are very powerful and allow
for some very elegant programming. Do you complain about AnsiStrings?
They are reference counted. Would you really want to have to free every
string explicitly? Dynamic arrays are similarly reference counted.
Reference counted interfaces allow you to create classes (and objects)
that behave in the same way as AnsiStrings. IMHO, a lot of standard
packages would be greatly improved if they used com interfaces.
More information about the fpc-pascal
mailing list