I ran valgrind on my code which uses hiredis, it points out the following individual lines in my code :
- redisAsyncConnect()
- redisAsyncConnectUnix()
- redisLibuvAttach()
- uv_loop_new()
I have used 'redisAsyncDisconnect' to free up the memory for the first two cases, couldn't find the right method for third one. For the fourth one i used uv_stop(). But still valgrind says there is definitely a loss in memory in all the four, what is the right way to release the memory ?