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.
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to