Use the allocator of the Schema for its Pointer.
The Pointer passed to construct the Schema can be from the stack or any transient storage, so the copy stored in the Schema must have the same lifetime/allocator as the Schema itself.
This commit is contained in:
parent
bfdcf49110
commit
dbb594bdb3
@ -409,7 +409,7 @@ public:
|
|||||||
Schema(SchemaDocumentType* schemaDocument, const PointerType& p, const ValueType& value, const ValueType& document, AllocatorType* allocator) :
|
Schema(SchemaDocumentType* schemaDocument, const PointerType& p, const ValueType& value, const ValueType& document, AllocatorType* allocator) :
|
||||||
allocator_(allocator),
|
allocator_(allocator),
|
||||||
uri_(schemaDocument->GetURI(), *allocator),
|
uri_(schemaDocument->GetURI(), *allocator),
|
||||||
pointer_(p),
|
pointer_(p, allocator),
|
||||||
typeless_(schemaDocument->GetTypeless()),
|
typeless_(schemaDocument->GetTypeless()),
|
||||||
enum_(),
|
enum_(),
|
||||||
enumCount_(),
|
enumCount_(),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user