13.1.23 Object Reference Types

An interface class (INTF) is a virtual class; the CORBA standard does not allow you to:

  • Create or hold an instance of the interface class
  • Use a pointer or a reference to the interface class

Instead, you use one of the object reference types, INTF_ ptr or INTF_var class.

You can obtain an object reference by using the_narrow static member function. Operations are invoked on these classes using the arrow operator (->).

The INTF_var class simplifies memory management by automatically releasing the object reference when the INTF_var class goes out of scope or is reassigned. Variable types are generated for many of the UDTs and are described in Using var Classes.