Legacy Issue Number: 6163
Source: Oracle ( Andrew Piper)
"The copy constructor deep-copies any data pointed to by the T_var constructor
parameter. This copy will be destroyed when the T_var is destroyed or when a new
value is assigned to it. Compliant implementations may, but are not required to, utilize
some form of reference counting to avoid such copies."
"The normal assignment operator deep-copies any data pointed to by the T_var
assignment parameter. This copy will be destroyed when the T_var is destroyed or
when a new value is assigned to it. Assigning a null pointer to a T_var is legal and
results in deallocation of the data pointed to by the T_var."
So my question is, is it legal to use ValueBase::_add_ref() and _remove_ref() instead of _copy_value() in this instance when T_var is representing a valuetype?
Reported: CPP 1.2 — Thu, 11 Sep 2003 04:00 GMT
Updated: Fri, 6 Mar 2015 20:58 GMT
CPP13 — _var's and valuetypes
- Key: CPP13-63
- OMG Task Force: C++ June 2011 RTF