Open oath-jia opened 11 years ago
You don't need deep copy. Because once you pass a pointer to ListValue
, it should manage it.
ListValue list;
list.Set(0, new FundamentalValue(true));
But we can also change the content that any pointer points by other way, without functions of ListValue
.
ListValue list;
list.Set(0, new FundamentalValue(true));
Value* v;
list.Get(0, &v);
delete v;
Is this not a bug?
From user's(who use the ListValue
) point of view, he shouldn't delete the v because this pointer is managed by ListValue.
I see. Thank you~
Should 'Set()' and 'Get()' do deep copy?