Memory Leaks Quick Report
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
Curtidas 0
Respostas
Elviro
04/02/2022
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);
GOSTEI 0
James
04/02/2022
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.
GOSTEI 0