Fixed my problem - finally.

Initially the FIB components operated on the main loop, dynamicly created at
runtime etc...  They were then moved to being threaded.  I just copied the
orginal code over to the threaded class.  The problem was that I was still
passing our main form as the owner to the fib classes when I was creating
them!!! (Hits himself in the head)  On the odd occasion an unhandled
exception was occuring in the threads constructor that was causing the
destructor to be called.  So I am now passing 'nil' as their owner when they
are created to solve the problem.

So basicly it was a cut and paste error.  
Sigh.

Thanks for your help Myles, it was helpful as I did learn that there should
be a seperate instance of the TFibDatabase for each thread.  I wasn't doing
this when I should have been. :)


Threads are fun!

Nahum

-----Original Message-----
From: Myles Penlington [mailto:[EMAIL PROTECTED]]
Sent: Thursday, 30 September 1999 09:37
To: Multiple recipients of list database
Subject: RE: [DUG-DB]: FIB & Multiple Transactions.


Nahum, here is another response I got ..

The Interbase client is thread safe, but you need separate database handles
for
each thread. You cannot share a connection across threads. Each connection
can
be multi-transaction, of course.

Paul


> I'm still working on it so I'll let you know the result.  In my case the 
> comment about creating a TFIBDatabase for each thread makes a bit of
> sense.
>  
> > There was one memory Leak I found that you had to fix as each 
> > thread exited.
> > But beyond that I can't offer any further help in this area.
> 
> I found that leak too.
> 
> 
> Unfortunatly we will be staying with D4 for a while because of where we 
> are with our project.  This means no IBX for me to play with, except for 
> here at home. :)
> 
> 
> 
> Nahum
> 
> --------------------------------------------------------------------------
> -
>   New Zealand Delphi Users group - Database List - [EMAIL PROTECTED]
>                   Website: http://www.delphi.org.nz
---------------------------------------------------------------------------
  New Zealand Delphi Users group - Database List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz
---------------------------------------------------------------------------
  New Zealand Delphi Users group - Database List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

Reply via email to