Skip to content

Commit

Permalink
🚑 hopefully fixed the memory leak
Browse files Browse the repository at this point in the history
  • Loading branch information
nlohmann committed Mar 8, 2018
1 parent 97559bb commit aa8fc2a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions include/nlohmann/detail/input/parser.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,7 @@ class parser

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;
}
}
Expand Down
1 change: 1 addition & 0 deletions single_include/nlohmann/json.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3526,6 +3526,7 @@ class parser

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;
}
}
Expand Down

0 comments on commit aa8fc2a

Please sign in to comment.