Fix Value::copyPayload() and Value::copy() (#704)

Value copy constructor shares the same code with Value::copy() and Value::copyPayload().
New Value::releasePayload() is used to free payload memory.
Fixes: #704
This commit is contained in:
Andrey Okoshkin
2018-01-12 11:26:34 +03:00
parent 2f227cb122
commit c69148c946
2 changed files with 69 additions and 63 deletions

View File

@@ -606,6 +606,7 @@ Json::Value obj_value(Json::objectValue); // {}
private:
void initBasic(ValueType type, bool allocated = false);
void releasePayload();
Value& resolveReference(const char* key);
Value& resolveReference(const char* key, const char* end);