Ms. Wong,
> This program seems to use a lot of the memory on the
> linux server, and
> the memory doesn't seem to be released at the end of
> execution. The same
> thing occurs when I try to connect to the database from
> MS Access via
> ODBC.
It's been my experience that Win32 ODBC does not drop
connections until the database client is closed (e.g. MS
Access is shut down). For example, I have a program that
connects MS Access through ODBC to a remote MySQL database
via an SSH tunnel; the tunnel does not close until I shut
down MS Access even if I kill the parent shell. ODBC keeps
it alive.
If, howoever, the connections (and their memory usage) are
persisting after termination of the client application, I
would look to your network environment for answers. It
could be that you are routing through a switch that is, for
some reason, keeping the client-server connection open after
data has stopped transmitting. The last place I'd look
would be the linux server; my experience is that Linux is
worlds better at managing connections than Win32 or cheap
Ethernet switches.
Good Luck!
-Josh