Hi.
I am using the latest version of TeeChart Pro (2012.07.121105) with Delphi XE2 (Update 4).
When I close my application after saving my chart to a JPG image using the method TeeSaveToJPEGFile() from unit "Teejpeg" I got this memory leak reported:
Note: In the Delphi Application you have to set ReportMemoryLeaksOnShutDown := True; to get this kind of memory leak report.
Is this a known issue?
Could you provide a fix for this?
Please let me know if you need any further information or a simple sample project to reproduce.
Best regrads.
TeeSaveToJPEGFile produces memory leak
Re: TeeSaveToJPEGFile produces memory leak
Hi marder,
I can reproduce it with v2012.07 but not with the actual sources we have here.
I think it was fixed when changing, in TeeJPEG.pas:
For this:
I can reproduce it with v2012.07 but not with the actual sources we have here.
I think it was fixed when changing, in TeeJPEG.pas:
Code: Select all
Function TJPEGExportFormat.Jpeg(const AOptions:TTeeJPEGOptions):TJPEGImage;
var Params : TJPEGDefaults;
begin
{ returns a JPEG image using the "Panel" (Chart) property }
if not Assigned(Panel) then
Raise Exception.Create(TeeMsg_ExportPanelNotSet);
CheckProperties;
{ set JPEG options }
Params:=JPEGDefaults;
if Assigned(AOptions) then FProperties:=AOptions;
Params.GrayScale:=FProperties.CBGray.Checked;
Params.CompressionQuality:=FProperties.UpDown1.Position;
Params.Performance:=TJPEGPerformance(FProperties.RGPerf.ItemIndex);
CheckSize;
{ obtain a JPEG image using parameters }
result:=TeeGetJPEGImageParams(Panel,Params,0,0,Width,Height);
end;
Code: Select all
Function TJPEGExportFormat.Jpeg(const AOptions:TTeeJPEGOptions):TJPEGImage;
var Params : TJPEGDefaults;
begin
{ returns a JPEG image using the "Panel" (Chart) property }
if not Assigned(Panel) then
Raise Exception.Create(TeeMsg_ExportPanelNotSet);
if Assigned(AOptions) then FProperties:=AOptions
else CheckProperties;
{ set JPEG options }
Params:=JPEGDefaults;
Params.GrayScale:=FProperties.CBGray.Checked;
Params.CompressionQuality:=FProperties.UpDown1.Position;
Params.Performance:=TJPEGPerformance(FProperties.RGPerf.ItemIndex);
CheckSize;
{ obtain a JPEG image using parameters }
result:=TeeGetJPEGImageParams(Panel,Params,0,0,Width,Height);
end;
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: TeeSaveToJPEGFile produces memory leak
Ok.
Could you confirm that this new code will make it to the next official release of TeeChart Pro?
In this case this will be good enougth for us.
Thanks and best regards.
Could you confirm that this new code will make it to the next official release of TeeChart Pro?
In this case this will be good enougth for us.
Thanks and best regards.
Re: TeeSaveToJPEGFile produces memory leak
Hi,
Yes, being in the actual sources we have here means it would be in a release if we prepared one. And I see no reason why anyone would revert this change.
Yes, being in the actual sources we have here means it would be in a release if we prepared one. And I see no reason why anyone would revert this change.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |