![]() |
The following CORBA types return object references to the caller:
- Any
- Array
- Sequence
- String
- Union
- WString (wide string)
It is the responsibility of the caller to manage the object references and their associated memory. There are two facilities provided by CORBA to do this:
- A_var
- This is the facility most frequently used by client code because it is a smart pointer and automatically releases its object reference when it is deallocated or assigned a new object reference. This is the safest and most straightforward approach to managing these types.
- A_ptr
- This is a pointer type and provides the most basic object reference, which has similar semantics to a standard C++ pointer.
Note: Avoid declaring C++ Static variables as _var. The _var holds a reference to an object. During the end of the process, this object could reference another object that was removed before end processing completes for this Static type. As a result, the _var could reference an inappropriate address or null pointer and thereby cause an undesirable ending.
Related reference... | |
CORBA C++ bindings | |
Parent: CORBA types and business objects | |
CORBA basic types | |