14.7.1 Memory Management
NVList has the following special memory management rules:
- Ownership of the return values of the
add,add_item,add_value,add_item_consume,add_value_consume, anditemfunctions is maintained by the NVList; these return values must not be freed by the caller. - The
char*parameters to theadd_item_consumeandadd_value_consumefunctions and theAny*parameter to theadd_value_consumefunction are consumed by the NVList. The caller may not access these data after they have been passed to these functions because the NVList may copy them and destroy the originals immediately. The caller must use theNamedValue::value()operation to modify thevalueattribute of the underlying NamedValue, if desired. - The
removefunction also callsCORBA::releaseon the removed NamedValue.
The following sections describe NVList member functions.