forked from qt-creator/qt-creator
Utils: Fix memory leak in JsonMemoryPool
objects are freed, but their dtors are not called... Detected by valgrind Change-Id: Iec8d78c205e9b2722ee5a89941df96c3383b385b Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com> Reviewed-by: Fawzi Mohamed <fawzi.mohamed@theqtcompany.com>
This commit is contained in:
committed by
Orgad Shaneh
parent
1679c07e74
commit
8f68b7ccba
@@ -42,8 +42,10 @@ using namespace Utils;
|
||||
|
||||
JsonMemoryPool::~JsonMemoryPool()
|
||||
{
|
||||
foreach (char *obj, _objs)
|
||||
foreach (char *obj, _objs) {
|
||||
reinterpret_cast<JsonValue *>(obj)->~JsonValue();
|
||||
delete[] obj;
|
||||
}
|
||||
}
|
||||
|
||||
JsonValue::JsonValue(Kind kind)
|
||||
|
||||
Reference in New Issue
Block a user