[fpc-devel] {$Interfaces Corba} and TInterfacedObject

Martin Schreiber fpmse at bluewin.ch
Fri Nov 30 09:30:58 CET 2007


On Friday 30 November 2007 08.21, Graeme Geldenhuys wrote:
> On 30/11/2007, Martin Schreiber <fpmse at bluewin.ch> wrote:
> > tnullinterfacedobject is needed in MSEgui for Delphi compatibility
> > because Delphi has no corba style interfaces.
>
> So basically you want to use interfaces without reference counting.
> What other benefits did you see to make you decide to use Corba
> interfaces instead of COM interfaces?  Why Corba over COM style?  It
> seems to me the COM interface implementation in FPC is a lot more
> stable and with more working features.
>
> I'm interested in interfaces, but not interested in reference
> counting. So I will rather use COM interfaces for now and
> TNonRefCountingObject (same as TNullInterfacedObject) as my base class
> to get interface support.  I gather that's how MSEgui works under
> Delphi? Why didn't you do the same under FPC?
>
Performance reasons. To use COM interfaces and to ignore reference counting 
calls in TNonRefCountingObject is no good solution.
With the MSEgui getcorbainterface function you can use corba style interfaces 
until FPC has working getinterface for them.

> > I think tobject.getinterface should work with corba interfaces too:
> >
> > http://www.freepascal.org/mantis/view.php?id=6036
>
> It doesn't look like that is going to be fixed any time soon. It was
> reported in 2005-06-14 and still hasn't even been acknowledged!
>
:-)
Reference counted widestrings is another theme:
http://www.freepascal.org/mantis/view.php?id=6060
And I'd like to remember the 'friend units' where protected class members are 
accessible in order to avoid the ugly and memory wasting fake class 
definitions 
"
implementation
type
 tsomeclass1 = class(tsomeclass)
end;
[....]
 with tsomeclass1(someclassinstance) do begin
end;
"
Packages support and faster compiling are on my wishlist too...

Martin



More information about the fpc-devel mailing list