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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.