Conversation

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
14
  
Jeff Overcash (TeamB) replied on 18-Sep-2012:

Charles Jensen wrote:
  (snip)

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

Jeff Overcash (TeamB) wrote:
    (snip)

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

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

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

(snip)

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

(snip)

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

Mohamad Alsalibi wrote:
    (snip)

I posted the solution in this thread.
    --
    Jeff Overcash (TeamB)
    (Please do not email me directly unless asked. Thank You)
39
      
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:
      {code}
      procedure TForm1.Button3Click(Sender: TObject);
      var
70
        
Jeff Overcash (TeamB) replied on 02-Jan-2013:

Ronnei Peterson Dantas da Luz wrote:
        (snip)

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)
25
          
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
          (snip)

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

Ronnei Peterson Dantas da Luz wrote:
            (snip)

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
43
              
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.
              (snip)

              
              
55
FYI: Phrase searches are enclosed in either single or double quotes
 
 
Originally created by
Tamarack Associates
Fri, 15 Nov 2024 07:09:40 UTC
Copyright © 2009-2024
HREF Tools Corp.