_var's and valuetypes
-
Key: CPP13-63
-
Legacy Issue Number: 6163
-
Status: open
-
Source: Oracle ( Andrew Piper)
-
Summary:
1.9.1 says:
"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."and
"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