From dbb594bdb397a16cc91df53466a5ea2cfbc8fb91 Mon Sep 17 00:00:00 2001 From: ylavic Date: Thu, 10 Jan 2019 18:42:16 +0100 Subject: 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. --- include/rapidjson/schema.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/rapidjson') diff --git a/include/rapidjson/schema.h b/include/rapidjson/schema.h index 57ec797a..5b622f78 100644 --- a/include/rapidjson/schema.h +++ b/include/rapidjson/schema.h @@ -409,7 +409,7 @@ public: Schema(SchemaDocumentType* schemaDocument, const PointerType& p, const ValueType& value, const ValueType& document, AllocatorType* allocator) : allocator_(allocator), uri_(schemaDocument->GetURI(), *allocator), - pointer_(p), + pointer_(p, allocator), typeless_(schemaDocument->GetTypeless()), enum_(), enumCount_(), -- cgit v1.2.3