Fórum Memory Leaks Quick Report #617570
04/02/2022
0
Boa tarde, eu chamo meu relatório e destruou o form mas mesmo assim fica dando memory leak.
13 - 20 bytes: TList x 1, TQRLinkPage x1
Segue o código
13 - 20 bytes: TList x 1, TQRLinkPage x1
Segue o código
try
Application.CreateForm(TQuick_A7DiferencaSNGPC, Quick_A7DiferencaSNGPC);
with Quick_A7DiferencaSNGPC do begin
with qry_Aux do begin
Close;
SQL.Clear;
SQL.Add(consulta);
Open;
end;
QuickRep1.Preview;
end;
finally
FreeAndNil(Quick_A7DiferencaSNGPC);
//Quick_A7DiferencaSNGPC.Free;
end;
Paulo
Curtir tópico
+ 0
Responder
Posts
24/03/2022
Elviro
Boa tarde, eu chamo meu relatório e destruou o form mas mesmo assim fica dando memory leak.
13 - 20 bytes: TList x 1, TQRLinkPage x1
Segue o código
13 - 20 bytes: TList x 1, TQRLinkPage x1
Segue o código
try
Application.CreateForm(TQuick_A7DiferencaSNGPC, Quick_A7DiferencaSNGPC);
with Quick_A7DiferencaSNGPC do begin
with qry_Aux do begin
Close;
SQL.Clear;
SQL.Add(consulta);
Open;
end;
QuickRep1.Preview;
end;
finally
FreeAndNil(Quick_A7DiferencaSNGPC);
//Quick_A7DiferencaSNGPC.Free;
end;
Opa, se o relatório está no formulário, basta executar o sql e usar o preview, após fechar o relatório tudo ficaria normal, não entendi o porque do FreeAndNil(Quick_A7DiferencaSNGPC);
Responder
Gostei + 0
23/03/2023
James
Boa tarde, eu chamo meu relatório e destruou o form mas mesmo assim fica dando memory leak.
13 - 20 bytes: TList x 1, TQRLinkPage x1
Segue o código
13 - 20 bytes: TList x 1, TQRLinkPage x1
Segue o código
try
Application.CreateForm(TQuick_A7DiferencaSNGPC, Quick_A7DiferencaSNGPC);
with Quick_A7DiferencaSNGPC do begin
with qry_Aux do begin
Close;
SQL.Clear;
SQL.Add(consulta);
Open;
end;
QuickRep1.Preview;
end;
finally
FreeAndNil(Quick_A7DiferencaSNGPC);
//Quick_A7DiferencaSNGPC.Free;
end;
Olá. Recentemente tive esse problema com o QuickReport 6.0. Acontece que as versões mais recentes do QuickReport parecem estar com esse problema. Para resolver precisa editar o arquivo QuickRpt.pas, que fica dentro da pasta src onde foi instalado o quick report;
Abra o arquivo no delphi e procure pelo destructor TCustomQuickRep.Destroy. Nele adicione o seguinte: currlinkpage.free;
Isso deve parar com o vazamento de memoria. Lembrando que a pasta src precisa estar adicionada no library path do delphi.
Responder
Gostei + 0
Clique aqui para fazer login e interagir na Comunidade :)