-
Type: Improvement
-
Resolution: Done
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Environment:All
libmongoclient links db/commands.o (via the coreDbFiles variable in SConstruct) into the client library. It does that only so it can define two new commands (connPoolSync and connPoolStats) in client/connpool.cpp. Since Command objects are held by raw pointer in a static map, these objects are never collected during fini processing for libmongoclient. As a result, client code that links libmongoclient will show (real) memory leaks when run under Purify or valgrind.
The two commands should be moved to db/commands.cpp, which can be done easily since the global 'pool' object on which they depend is exposed in the connpool.h header, and the db/commands.o file should be removed from the link list for libmongoclient