mirror of
https://github.com/nlohmann/json.git
synced 2026-07-10 20:45:09 +00:00
🚑 hopefully fixed the memory leak
This commit is contained in:
@@ -403,6 +403,7 @@ class parser
|
|||||||
|
|
||||||
if (keep and callback and not callback(depth, parse_event_t::value, result))
|
if (keep and callback and not callback(depth, parse_event_t::value, result))
|
||||||
{
|
{
|
||||||
|
result.m_value.destroy(result.m_type);
|
||||||
result.m_type = value_t::discarded;
|
result.m_type = value_t::discarded;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3526,6 +3526,7 @@ class parser
|
|||||||
|
|
||||||
if (keep and callback and not callback(depth, parse_event_t::value, result))
|
if (keep and callback and not callback(depth, parse_event_t::value, result))
|
||||||
{
|
{
|
||||||
|
result.m_value.destroy(result.m_type);
|
||||||
result.m_type = value_t::discarded;
|
result.m_type = value_t::discarded;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user