TOracleQuery.Close and Memory

mengue

Member²
When I run the this code many times, the memory free decrements 70kb/min.
In the test project I have a timer to execute this code every 10ms.
If the "OQ2.Close" method is removed, the memory free estabilish!

See the example code:

OQ.SQL.Add('SELECT * FROM TABLE WHERE ID=' +IntToStr(ID)+' ORDER BY ID,PRI,ORDEM');
OQ.Execute;
OQ.Close;
 
Could it be that you are using Net8 8.0.x? It has a bug that causes this memory leak when closing queries. You can fix it by upgrading to Net8 8.1.x, or by setting TOracleSession.Preferences.UseOCI7 to True (this is only possible if you are not using any Net8 specific objects, such as LOB's, Objects, and References).

------------------
Marco Kalter
Allround Automations
 
I teste your 2 options to solve the problem and they realy function.
- with OCI7, ok.
- with Net8.1.x, ok.
 
Back
Top