Skip to content

Commit dbb594b

Browse files
committed
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.
1 parent bfdcf49 commit dbb594b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/rapidjson/schema.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ class Schema {
409409
Schema(SchemaDocumentType* schemaDocument, const PointerType& p, const ValueType& value, const ValueType& document, AllocatorType* allocator) :
410410
allocator_(allocator),
411411
uri_(schemaDocument->GetURI(), *allocator),
412-
pointer_(p),
412+
pointer_(p, allocator),
413413
typeless_(schemaDocument->GetTypeless()),
414414
enum_(),
415415
enumCount_(),

0 commit comments

Comments
 (0)