Article

From:
To:
Jeff Overcash (TeamB)
Subject:
Re: IBQuery memory leak [Edit]
Newsgroup:
embarcadero.public.delphi.database.interbase_express

Re: IBQuery memory leak [Edit]

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
Pquery:Tibquery;
begin
     Pquery:=Tibquery.create(nil);
     Pquery.database:=Self.IBDatabase1;
     Pquery.close;
     pquery.sql.clear;
     pquery.sql.add('Select * from tabparametros');
     pquery.open;
     pquery.close;
     pquery.Destroy;
end;
{code}


Thank you for your attention
PS: I am a Brazilian and develop this text was translated with Google Translate
> {quote:title=Jeff Overcash (TeamB) wrote:}{quote}
> Mohamad Alsalibi wrote:
> >> {quote:title=Charles Jensen wrote:}{quote}
> >> 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
> > 
> > Any Solution to the Leaking problem. I had the same thing with IB Components, the app fails with out of memory error.
> 
> I posted the solution in this thread.
> 
> -- 
> Jeff Overcash (TeamB)
>        (Please do not email me directly unless  asked. Thank You)
> And so I patrol in the valley of the shadow of the tricolor
> I must fear evil. For I am but mortal and mortals can only die.
> Asking questions, pleading answers from the nameless
> faceless watchers that stalk the carpeted  corridors of Whitehall.
>               (Fish)

Edited by: Ronnei Peterson Dantas da Luz on Jan 1, 2013 4:31 PM
FYI: Phrase searches are enclosed in either single or double quotes
 
 
Originally created by
Tamarack
Tue, 13 Apr 2021 17:19:57 UTC
Copyright © 2009-2021
HREF Tools Corp.