The Delphi Bug List

Entry No.
530
BDE
It looks like the BDE leaks memory resources each time it's started and stopped.
BDE version:
2.5 2.51 2.52 3.01 3.02 3.12 3.50 4.0 4.01 4.51 5.0 5.01 5.10
UnknownUnknownUnknownUnknownUnknownUnknownUnknownUnknownUnknownUnknownUnknownExistsUnknown
Description
Reported by Maurizio Ferreira; checked by Reinier Sterkenburg; Peter Klotz; Heidar Rafn Hardarson
If you have a program that opens and closes the BDE several times you can lock your system (I had a program that opened and closed the BDE at each arrival of data and it locked nt4 sp3).
The bug can be reproduced using a form with a Timer and the following code as event handler:
procedure TForm1.TimerTimer(Sender: TObject);
begin
  if not Loaded
  then Check (dbiinit (nil))
  else Check (dbiexit);
  Loaded := not Loaded
end;

procedure TForm1.check (cc:dbiresult);
begin
  if cc <> dbierr_none
  then raise exception.create (format ('dbi error %d',[cc]));
end;
(use unit BDE; declare Loaded as a Boolean and initialize it to False)

After activating the program follow memory usage with any monitor.
I tried this with Delphi 4 pro, patch #2, and BDE 5.01, but I'm quite sure the bug exists with previous versions of the BDE.
It has also been reproduced with Delphi 5.0, BDE 5.10
I've seen the bug both on win98 and Nt4 sp3

Heidar Rafn Hardarson added (8 Dec 99):
At our company we have encountered this on connections to Interbase (version 4.2) on same computer as the client program - BUT we have also seen the problem disappear and this connects to how the BDE-alias is configured:
when "Server Name" is on the form 'databasefile', i.e. local interbase connection the problem exists, but when it is like '\\servername\databasefile' (NetBeui protocol) or 'servername:databasefile' (TCP/IP protocol) the problem disappears.
The problem disappears on IB 5.5

Latest update of this entry: 2002-04-03

Post a comment on this bug


Index page
Delphi Bug List home page
The Delphi Bug Lists are presently maintained by Jordan Russell, who has taken over this task from Reinier Sterkenburg since August 2000.
All feedback is appreciated. See also the feedback section of the Delphi Bug List home page.