TOracleSession memory usage

sergio.sette

Member²
D2009, DOA 4.1.2
A simple program with an empty form with a TOracleSession component.
Running the program the task manager shows a memory usage of about 4 MB. Calling the Logon method, after the database connection is established the memory consumption jumps to 14 MB. Closing the session doesn't release the memory.
Is this memory usage normal ?

Sergio 7
 
The first logon will load the Oracle Call Interface libraries and will initialize the Oracle environment. This can indeed allocate 10MB. When the session is logged off this memory is indeed not freed: the libraries remain loaded, and the Oracle environment will persist.
 
Tnx Marco,

is there a way to unload the OCI ? I'm writing a small tray icon application that should be as smart as possible.

s7
 
After disconnecting and/or freeing all TOracleSession instances, you can call DLLExit from the OracleCI unit. This will free the Oracle Environment and will unload the libraries.
 
Maybe the process memory is not immediately freed when unloading the library. That's all you can you though.
 
Back
Top