[fpc-pascal] Where and Why is there a memory leak?
pascaldragon at googlemail.com
Wed Sep 6 17:20:58 CEST 2017
Am 06.09.2017 17:03 schrieb "Ryan Joseph" <ryan at thealchemistguild.com>:
> > On Sep 6, 2017, at 8:03 PM, Graeme Geldenhuys <
mailinglists at geldenhuys.co.uk> wrote:
> > I couldn't call .Free because FHook was a interface reference type of
type IHook, not THook.
> But TInterfacedObject is a class isn’t it? Then you call FHook :=
THook.Create; so a I’d expect a Free(). What am I missing?
> THook = class(TInterfacedObject, IHook)
> procedure DoIt;
You're missing that FHook was declared as IHook, not THook.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the fpc-pascal