Subject Re: IBO caching
Author jrodenhi
If you are using FastMM and you close the application at that point,
you can set an option (I think it's ReportMemoryLeaksOnExit) and it
will report whether your application has any leaks.

It seems like I have seen references that say you can't rely on this
or that to determine whether your application is failing to release
memory (leaking). The FastMM option seems pretty foolproof.

If you need help pursuing this, I can go through the steps you need to
follow to make it work. My application had a bunch of memory leaks
that all came from two or three non-freed objects, but I could not
find them until I got into FastMM. Now memory leaks still happen once
in a while but they are really easy to find.

-Jack

--- In IBObjects@yahoogroups.com, "williamvdw2005" <williamvdw@...> wrote:
>
> Hi all,
>
> I have written a simple test application. It opens a connection to a
> firebird database, does a single sequery and closes and frees all the
> IB components. My problem is that after I have freeded all the IB
> components my test app still uses ab out 2 mb of ram more then when
> the app started.
>
> Is this due to caching on IBO's side?
> If so how can `n make it less or perhaps free it?
> Will this cache be shared among connections in a multithreaded
> envirnonment?
>
> Sample code of the create function
>
> Session := TIB_Session.Create(nil);
> Connection := TIB_Connection.Create(Session);
> Connection.Protocol := cpTCP_IP;
> Connection.Server := '127.0.0.1';
> Query := TIB_Query.create(Session);
> Transaction := TIB_Transaction.Create(Session);
> Transaction.IB_Connection := Connection;
> Query.IB_Transaction := Transaction;
> Query.IB_Connection := Transaction.Connections[0];
> Query.RequestLive := requestLive;
> Transaction.Isolation := tiCommitted;
> Transaction.ReadOnly := false;
> Connection.Path := DBPath;
> Connection.Username := username;
> Connection.Password := password;
>
> Sample code of the destroy function
>
> Query.Close;
> Query.Free;
> Connection.Disconnect;
> Connection.Close;
> Connection.Free;
> Transaction.Close;
> Transaction.Free;
> Session.Free;
>
> Thanks in Advance
>