A .NET (C#) application using ODBC connections to SAP HANA is leaking memory consuming all memory available and then it crashes. The memory profiler shows memory leaks in odbc32 unmanaged module. Testing two SAP HANA drivers (HDBODBC 1.00.120.24 and 1.0.0.120.100), both are leaking memory.
Calling OdbcConnection.ReleaseObjectPool()
(
ODBC leaking memory in c# application) doesn't solve the problem.
How to solve this memory leak?
The solution is to use pooled connections by selecting "Pool Connections to this driver" in ODBC Data Source Administrator, in Connection Pooling tab. By default HDBODBC is set as <not pooled>
.