The naming of
{$interfaces com} and
{$interfaces corba} is a bit misleading. The main difference is that if
{$interfaces com} is set then an interface inherits from
IUnknown which provides the methods
_AddRef,
_Release and
QueryInterface which in turn allows the compiler to provide automatic reference counting for such interfaces as well as support for the
as and
is operators. It's suggested to inherit from
TInterfacedObject in such cases (though in no way required). "CORBA" interfaces on the other hand are raw interfaces. They don't inherit from anything and they don't provide reference counting, so you yourself are responsible that the class instance implementing the interfaces is freed at the end.