[Lazarus] IUnknown and reference counting

Sven Barth pascaldragon at googlemail.com
Mon Mar 25 10:04:35 CET 2013


Am 25.03.2013 01:49, schrieb Graeme Geldenhuys:
> On 2013-03-21 17:46, Hans-Peter Diettrich wrote:
>> Thanks for giving me insight into the crippled implementation of
>> interfaces in FPC :-]
> Sorry, but you seem very confused. The default Interfaces "style" used
> by FPC is the COM-style interfaces. 100% compatible with Delphi. So I
> really do not see your problem.
>
>
>   IUnknown & IInterface    -> Exactly the same as Delphi
>   TInterfacedObject        -> Exactly the same as Delphi
>
> To use CORBA-style interfaces, you need to explicitly tell the compiled
> to do so, via the {$interfaces corba} directive.
>
> I use plenty of projects that use Interfaces, and that code is shared
> verbatim between Delphi and FPC. Just take a look at the tiOPF project.
While I basically agree with your comment, this is not what DoDi meant 
if you look at his answer to my question what he means with that. His 
point is the missing possibility to alias only a subset of an interfaces 
function to a delegate which seems to be supported in Delphi and which 
is reported here: http://bugs.freepascal.org/view.php?id=16531

Regards,
Sven




More information about the Lazarus mailing list