Subject | IBO Admin and Default Session Leaks |
---|---|
Author | Toby Leonard |
Post date | 2006-04-03T22:40:21Z |
I just started using the IBO Admin components to handle backing up a bunch of
FB DBs. (Before I'd been calling gbak from code and waiting on the process
handle.) The resulting backups work fine, but I'm seeing memory leaks - one
for each thread that backs up a DB.
FastMM to the rescue, I found the leaks are due to some TIB_Session objects
not being freed. Looking at the IBO Admin files, it's always using the
default session, and I don't see a way (short of modifying the code) to get it
to accept another one. I know with IB you need to have a separate session per
thread, and that works great in a couple other apps I've written.
So any ideas on how to prevent these leaks? My first thought was wrapping the
backup function in a critical section and calling the whole via Synchronize,
but 1) that's pretty roundabout and defeats the point of running it in a
thread with the rest of the DB creation code, 2) it'll hang the GUI thread
while it's processing, and 3) would (I think) still leave one leaked TIB_Session.
Thanks!
Toby
--
Toby Leonard | tobyl@...
FB DBs. (Before I'd been calling gbak from code and waiting on the process
handle.) The resulting backups work fine, but I'm seeing memory leaks - one
for each thread that backs up a DB.
FastMM to the rescue, I found the leaks are due to some TIB_Session objects
not being freed. Looking at the IBO Admin files, it's always using the
default session, and I don't see a way (short of modifying the code) to get it
to accept another one. I know with IB you need to have a separate session per
thread, and that works great in a couple other apps I've written.
So any ideas on how to prevent these leaks? My first thought was wrapping the
backup function in a critical section and calling the whole via Synchronize,
but 1) that's pretty roundabout and defeats the point of running it in a
thread with the rest of the DB creation code, 2) it'll hang the GUI thread
while it's processing, and 3) would (I think) still leave one leaked TIB_Session.
Thanks!
Toby
--
Toby Leonard | tobyl@...