Closed Sathavahana1901 closed 3 weeks ago
I'm quite sure that codesonar is wrong. The type heap_string
is used to hold basic_json
string values, and as such is the most used type in the jsoncons library. We perform memory checks for all builds, and detect no leaks. The diagnostic is wrong, there is no lost reference.
Memory leak in heap_string
issue: a resource leak in jsoncons/detail/heap_string.hpp at line 158. The warning indicates that a memory resource allocated at new_allocator.h:114 was not freed, and the last reference to it was lost at heap_string.hpp:175.
actual behavior : static code analysis(codesonar) tool reporting memory leak
expected behavior : static code analysis(codesonar) tool report should be clean with out any bugs
run jsoncons through codesonar static analysis tool
Include a small, self-contained example if possible
What compiler, architecture, and operating system?
What jsoncons library version?