I built C++ 17 NanoLog static library from the latest source code and linked it to my application. C++ Address Sanitizer is used also.
When my program exited, the sanitizer report indicates there is a memory leak.
==18544==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 1073741824 byte(s) in 1 object(s) allocated from:
#0 0x7f0f8da7f747 in malloc (/usr/lib64/libasan.so.6+0xb4747)
#1 0x409b6e in NanoLogInternal::Log::Decoder::Decoder() /app/NanoLog/runtime/Log.cc:620
Direct leak of 1048640 byte(s) in 1 object(s) allocated from:
#0 0x7f0f8da810a7 in operator new(unsigned long) (/usr/lib64/libasan.so.6+0xb60a7)
#1 0x409cd3 in NanoLogInternal::Log::Decoder::allocateBufferFragment() /app/NanoLog/runtime/Log.cc:1138
#2 0x409cd3 in NanoLogInternal::Log::Decoder::allocateBufferFragment() /app/NanoLog/runtime/Log.cc:1130
#3 0x409cd3 in NanoLogInternal::Log::Decoder::Decoder() /app/NanoLog/runtime/Log.cc:631
SUMMARY: AddressSanitizer: 1074790464 byte(s) leaked in 2 allocation(s).
Here is the piece of code about NanoLog in my program.
I built C++ 17 NanoLog static library from the latest source code and linked it to my application. C++ Address Sanitizer is used also. When my program exited, the sanitizer report indicates there is a memory leak.
Here is the piece of code about NanoLog in my program.
Is it a bug in Nanolog or I have misused NanoLog? Thanks.