<p>Am 06.09.2017 17:03 schrieb "Ryan Joseph" <<a href="mailto:ryan@thealchemistguild.com">ryan@thealchemistguild.com</a>>:<br>
><br>
><br>
> > On Sep 6, 2017, at 8:03 PM, Graeme Geldenhuys <<a href="mailto:mailinglists@geldenhuys.co.uk">mailinglists@geldenhuys.co.uk</a>> wrote:<br>
> ><br>
> > I couldn't call .Free because FHook was a interface reference type of type IHook, not THook.<br>
><br>
> 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?<br>
><br>
> type<br>
> THook = class(TInterfacedObject, IHook)<br>
> private<br>
> procedure DoIt;<br>
> end;</p>
<p>You're missing that FHook was declared as IHook, not THook.</p>
<p>Regards,<br>
Sven</p>