On Mon, Sep 19, 2011 at 11:10 AM, Martin Schreiber <[email protected]> wrote: > On Monday 19 September 2011 15.55:57 Marcos Douglas wrote: >> I understood, but that case is the same that TInterfacedObject, isn't? >> > TInterfacedObject with COM interface _Addref()/_Release uses compiler magic > which is more magic in FPC (intermediate variables) than in Delphi. ;-) > With CORBA interface and explicitly calling Addref()/Release() there is better > control to define the destroying event.
So, my implementation of ref-counted using CORBA will be equal to TInterfaceObject, but I have to call _AddRef/_Release explicitly. Ok, that is not a problem... a little less magic, but works ;-) >> You're right. >> So, if my code will have compatibility with Delphi, is better to use >> CORBA interfaces and no reference counted if I compile it on Delhi. Is >> this the best way? >> > So it is done in MSEgui. Or use COM interfaces and *never* explicitly destroy > an implementing object instance. BTW newer Delphi have CORBA interfaces too > AFAIK. COM interfaces is to use in Windows, AFAIK. I don't think using COM is the better way to use interfaces in FPC, so you too. To FPC I choose CORBA and instances of class variables and to compile in Delphi something like tnullinterfacedobject. ;-) Thank you very much. Marcos Douglas _______________________________________________ MSEide-MSEgui-talk mailing list [email protected] https://lists.berlios.de/mailman/listinfo/mseide-msegui-talk

