Subject Re: [IBO] Threaded quiries
Author Jason Wharton
> thanx for the help
> I'm still getting the locks though - so could you please verify that this
> code is correct?
> thanx
> ================
> on Create
> FSession := TIB_Session.Create(nil);
> FConnection := TIB_Database.Create(FSession);
> FTransaction := FConnection.DefaultTransaction;
>
> and on Destroy
> FConnection.Disconnect;
> FSession.Free;
> FConnection.Free;
> ================
> Louis

If the session owns the other components then you only need to free the
owner (session) otherwise, you should free the connection prior to freeing
the session. As it seems, your code is invoking the operation to free an
object with an invalid pointer.

Jason Wharton