[fpc-pascal] A serious Memleak using delegates/implements (was: Delegate Interface class does not seem to be referenced counted)

Graeme Geldenhuys mailinglists at geldenhuys.co.uk
Thu Oct 6 00:03:29 CEST 2016


On 2016-10-05 16:26, Marcos Douglas wrote:
> So, I coded a new example — more simpler, I think — to demonstrate the same
> problem and prove that there is some wrong that is causing a memleak.

Martin Schreiber recently mentioned in another Interface discussion that
there is a very good reason he doesn’t use COM style interfaces…
Reference Counting!

Stick with CORBA style interfaces and things work much simpler. I have
to agree. I’ve used CORBA style interfaces for years with great success
and no memory leaks. You get all the benefits of Interfaces, but without
the Reference Counting troubles and complexities. If you really are
writing COM (Windows specific) applications, then fine — otherwise use
CORBA style interfaces.

Just my 2¢ worth.

Regards,
  Graeme

-- 
fpGUI Toolkit — a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

My public PGP key:  http://tinyurl.com/graeme-pgp



More information about the fpc-pascal mailing list