[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 12:08:40 CEST 2016


On 2016-10-05 23:16, Tony Whyman wrote:
> Used properly reference counted interfaces are very powerful and allow 
> for some very elegant programming. Do you complain about AnsiStrings?

I have very powerful and elegant programming with CORBA interfaces too.
;-) Also as Martin mentioned, reference counting works wonders in simple
cases, but gets very nasty in medium to complex cases. I've seem some
COM Interface code where they had to resort to using raw Pointer types
etc to try and avoid reference counting and causing unexpected memory
leaks.  No such problems with CORBA Interfaces.

ps:
  You can obviously implement your own reference counted CORBA interface
  for the simple cases too. So you have the best of both worlds I guess,
  but when using CORBA Interfaces, I would avoid mixing reference
  counted and non-reference counted interfaces.

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