[Lazarus] IUnknown and reference counting

Sven Barth pascaldragon at googlemail.com
Mon Mar 25 14:03:34 CET 2013


Am 25.03.2013 13:03, schrieb Hans-Peter Diettrich:
>
>> And I must do more work in my class by adding IUnknown to the 
>> TMySuperClass too.
>
> Dunno whether this is required for bare Delphi interfaces. Reference 
> counting does not require IUnknown, as can be seen with dynamic arrays 
> and strings.
Delphi's interfaces ALWAYS descend from IUnknown thus one must always 
have the QueryInterface, AddRef and Release methods implemented.

Regards,
Sven




More information about the Lazarus mailing list