Commit 63ae3b73 authored by Milo Yip's avatar Milo Yip

Fix memory leak

parent d72f52bb
......@@ -1505,6 +1505,7 @@ public:
~GenericSchemaValidator() {
Reset();
RAPIDJSON_DELETE(ownStateAllocator_);
}
void Reset() {
......@@ -1693,7 +1694,7 @@ private:
void CreateOwnAllocator() {
if (!stateAllocator_)
stateAllocator_ = ownStateAllocator_ = new StateAllocator;
stateAllocator_ = ownStateAllocator_ = RAPIDJSON_NEW(StateAllocator());
}
bool BeginValue() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment