Pointer Attributes Applied to the Parameter

Each pointer attribute (ref, unique, and ptr) has characteristics that affect memory allocation. The following table summarizes these characteristics:

Pointer attribute Client Server
Reference (ref) Client application must allocate. Special handling needed for for out-only non-top-level pointers.
Unique (unique) If a parameter, then client application must allocate; if embedded, can be null.

Changing from null to non-null causes client stub to allocate; changing from non-null to null can cause orphaning.

Full (ptr) If a parameter, client application must allocate; if embedded, can be null.

Changing from null to non-null causes client stub to allocate; changing from non-null to null can cause orphaning.


The ref attribute indicates that the pointer points to valid memory. By definition, the client application must allocate all the memory the reference pointers require.

The unique pointer can change from null to non-null. If the unique pointer changes from null to non-null, new memory is allocated on the client. If the unique pointer changes from non-null to null, orphaning can occur. For more information, see Memory Orphaning.