You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
Compiler: g++
Architecture (e.g. x86, x64) x86
Operating system: ubuntu
What jsoncons library version?
Latest release 0.177.0
The text was updated successfully, but these errors were encountered:
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?
The text was updated successfully, but these errors were encountered: