Fix memory leak
This commit is contained in:
parent
d72f52bbea
commit
63ae3b730a
@ -1505,6 +1505,7 @@ public:
|
|||||||
|
|
||||||
~GenericSchemaValidator() {
|
~GenericSchemaValidator() {
|
||||||
Reset();
|
Reset();
|
||||||
|
RAPIDJSON_DELETE(ownStateAllocator_);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Reset() {
|
void Reset() {
|
||||||
@ -1693,7 +1694,7 @@ private:
|
|||||||
|
|
||||||
void CreateOwnAllocator() {
|
void CreateOwnAllocator() {
|
||||||
if (!stateAllocator_)
|
if (!stateAllocator_)
|
||||||
stateAllocator_ = ownStateAllocator_ = new StateAllocator;
|
stateAllocator_ = ownStateAllocator_ = RAPIDJSON_NEW(StateAllocator());
|
||||||
}
|
}
|
||||||
|
|
||||||
bool BeginValue() {
|
bool BeginValue() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user