IBQuery memory leak

(overview of excerpts from articles in conversation)

Newsgroup: embarcadero.public.delphi.database.interbase_express

# Lines
wrote on 18-Sep-2012:

I'm having a problem with memory leaks after updating (several) projects from XE2 to XE3.
Clearly visible when ReportMemoryLeaksOnShutdown is enabled. => It seems to be related to using TIBQuery.
Could it be because memory is allocated with GetMem/ReAllocMem (in IBAlloc) and freed by "FreeRecordBuffer" by setting the pointer to nil?
- Charles
Jeff Overcash (TeamB) replied on 18-Sep-2012:

Charles Jensen wrote:

Yes that is a leak. change it to
  procedure TIBCustomDataSet.FreeRecordBuffer(var Buffer: TRecordBuffer);
  if Assigned(Buffer) then
Jeff Overcash (TeamB) replied on 18-Sep-2012:

Jeff Overcash (TeamB) wrote:

found two more going through the code. Also change
    destructor TIBCustomDataSet.Destroy;
Charles Jensen replied on 18-Sep-2012:

Thanks ! (and thanks for a good set of components - been using them for many years!)
quinn wildman replied on 24-Sep-2012:

Charles Jensen wrote:
Did this get logged in QC? The fix could be logged there as well.
Charles Jensen replied on 06-Oct-2012:


Yes - finally (109318)
Mohamad Alsalibi replied on 02-Nov-2012:


Any Solution to the Leaking problem. I had the same thing with IB Components, the app fails with out of memory error.
Jeff Overcash (TeamB) replied on 02-Nov-2012:

Mohamad Alsalibi wrote:

I posted the solution in this thread.
    Jeff Overcash (TeamB)
    (Please do not email me directly unless asked. Thank You)
Ronnei Peterson Dantas da Luz replied on 02-Jan-2013:

Hello Jeff Overcash, what is needed after changing the units? I did what you suggested but the leak remains, is necesssário recompile the IBX, if yes, how?
      My test:
      procedure TForm1.Button3Click(Sender: TObject);
Jeff Overcash (TeamB) replied on 02-Jan-2013:

Ronnei Peterson Dantas da Luz wrote:

Just apply the first update, the memory leak is fixed in it.
        Jeff Overcash (TeamB)
        (Please do not email me directly unless asked. Thank You)
Ronnei Peterson Dantas da Luz replied on 03-Jan-2013:

Hello Jeff Overcash, I downloaded the update but it does not applied the fix already redid the installation 3 times, now I'm downloading an ISO that already contains the complete Update 1 to see if it solves the problem, post here the result after you finish installing this ISO .
          Thanks for Attention

Jeff Overcash (TeamB) replied on 03-Jan-2013:

Ronnei Peterson Dantas da Luz wrote:

I just double checked it, all fixes except for the one with IBBCDField (which is
            a compiler bug workaround, but requires an interface breaking change so has to
            be delayed to the mobile release) are there. First thing I do with any patch is
            diff my working tree against the source tree supplied to see if any fixes were
Ronnei Peterson Dantas da Luz replied on 03-Jan-2013:

Jeff, worked with Update 1 Delphi XE3, the updater is in trouble, I had to uninstall Delphi XE3 and install from an ISO that already contained the first update.
              Thanks for your time in answering the post.

FYI: Phrase searches are enclosed in either single or double quotes
Originally created by
Fri, 30 Jul 2021 22:51:16 UTC
Copyright © 2009-2021
HREF Tools Corp.