-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Query Execution
-
Fully Compatible
-
ALL
-
None
-
None
-
None
-
None
-
None
-
None
-
None
I've stumbled upon a possible memory leak when onDestroy throws an exception, which is caught and silenced in connpool.cpp. This can lead to unreleased memory, which is not even detected, as we don't even log anything about it.
One possible fix can be to wrap the delete statement:
try { ScopeGuard cleanup([&] { delete toDelete[i]; }); onDestroy(toDelete[i]); } catch (...) { // we don't care if there was a socket error }
As a side note, I could not find an implementation for this onDestroy, so maybe it's worth investigating as well.