Allocating and Initializing

There is a variety of ways of allocating memory for CORBA data types. Most of these data types, apart from very simple types such as CORBA::Short, may be allocated either on the stack or on the heap (free store).

It is a general principle that CORBA data types are always initialized before being passed in an invocation. For example, a blank string should always be initialized as "" (empty string) and never as NULL.

The following sections give examples of how to allocate and initialize a wide variety of CORBA data types. Basic data types such as short, unsigned short, long, unsigned long, float, double, long long, unsigned long long, and the enum type are not covered, because they are trivial.

String Types

CORBA strings ...

Get Pure CORBA now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.