<p>Am 06.09.2017 10:31 schrieb "Graeme Geldenhuys" <<a href="mailto:mailinglists@geldenhuys.co.uk">mailinglists@geldenhuys.co.uk</a>>:<br>
> type<br>
> IHook = interface<br>
> ['{4BCAEDD8-92D8-11E7-88D3-C86000E37EB0}']<br>
> procedure DoIt;<br>
> end;<br>
><br>
> type<br>
> THook = class(TInterfacedObject, IHook)<br>
> private<br>
> procedure DoIt;<br>
> end;<br>
><br>
> procedure THook.DoIt;<br>
> begin<br>
> writeln(ClassName + ' did it');<br>
> end;</p>
<p>I think THook needs to derive from TAggregatedObject, cause that couples the reference counting to that of the controlling instance.<br>
See here: <a href="http://docwiki.embarcadero.com/RADStudio/Tokyo/en/Implementing_Interfaces">http://docwiki.embarcadero.com/RADStudio/Tokyo/en/Implementing_Interfaces</a> </p>
<p>Regards,<br>
Sven</p>