Am 06.09.2017 17:03 schrieb "Ryan Joseph" <r...@thealchemistguild.com>:
>
>
> > On Sep 6, 2017, at 8:03 PM, Graeme Geldenhuys <
mailingli...@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?
>
> type
>  THook = class(TInterfacedObject, IHook)
>  private
>    procedure DoIt;
>  end;

You're missing that FHook was declared as IHook, not THook.

Regards,
Sven
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to