jcarreira / cirrus-kv

High-performance key-value store

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Memory leak in TCPClient

TylerADavis opened this issue · comments

Valgrind complains that memory is lost when the TCPClient is finished running. Namely, it complains about the pointers to the std::threads and the call to new that creates them, as well as the send queue.

I tried putting print statements/log statements into the TCPClient's destructor, but for some reason they never showed (perhaps because the TCPClient is stored in a std::unique_ptr<TCPClient> which is then cast to a std::unique_ptr<BladeClient>, so perhaps the superclass destructor is being called instead.

I've currently got a fix for this on the c_array_test branch, but I could also make a new branch with only the fix