Board index » delphi » Memory Leak in Delphi 4/BDE 5.01

Memory Leak in Delphi 4/BDE 5.01

Help,

I just received the Delphi 4 Update #3, complete with BDE 5.01 Web
Update (third version of BDE 5.01).

However, I still experience memory leaks whenever a memo field is copied
from any Paradox table or query to a TStrings object.  The memory leaks
are reported by Memory Sleuth.

All of the following four code options cause a memory leak:

1.
  biolifeTbl.active := True;
        memo1.Lines.Assign(biolifeTbl.FieldByName('Notes'));
  biolifeTbl.Active := False;

2.
  biolifeTbl.active := True;
        str := TMemoryStream.Create;
        BiolifeTblNotes.SaveToStream(str);
        str.Free;
  biolifeTbl.Active := False;

3.
  biolifeTbl.active := True;
        str := BiolifeTblNotes.AsString;
  biolifeTbl.Active := False;

4.
  biolifeTbl.active := True;
  s := TStringList.Create;
        s.Assign(BiolifeTblNotes);
  s.Free;
  biolifeTbl.Active := False;

I reported this bug to Inprise about a month ago, but have recieved no
response.  Does anyone know of a fix or work around?

This is a big time memory leak which ultimately causes any proigram to
crash.

Art Loveless

 

Re:Memory Leak in Delphi 4/BDE 5.01


Quote
Art Loveless wrote:

> Help,

> I just received the Delphi 4 Update #3, complete with BDE 5.01 Web
> Update (third version of BDE 5.01).

> However, I still experience memory leaks whenever a memo field is copied
> from any Paradox table or query to a TStrings object.  The memory leaks
> are reported by Memory Sleuth.

Try MemProof. This does not report this kind of bugs.
Maybe, this is a bug of Memory Sleuth :-)

http://www.nidlink.com/~astoyanov/index.htm

Cu, Marco

Other Threads