Deallocate memory

Stimulsoft Reports.WEB discussion
Post Reply
r.bianco
Posts: 75
Joined: Thu Oct 27, 2016 2:06 pm

Deallocate memory

Post by r.bianco »

Reports.Web 2020.4.1.0

Good morning,
in the web application where we use the stimulsoft reports we have a problem of non-deallocated memory.
After exporting the report, how can I deallocate the memory used?

Code: Select all

StiReport myReport;
myReport = new StiReport();
[...]
myReport.Compile();
myReport.Render(false);
Stimulsoft.Report.Export.StiPdfExportSettings stiSet = new Stimulsoft.Report.Export.StiPdfExportSettings();
stiSet.ImageQuality = 1;
stiSet.ImageResolutionMode = Stimulsoft.Report.Export.StiImageResolutionMode.Auto;
myReport.ExportDocument((StiExportFormat)Formato, pathFileEsportazione, stiSet);
myReport = null;
Soft System srl
Lech Kulikowski
Posts: 6271
Joined: Tue Mar 20, 2018 5:34 am

Re: Deallocate memory

Post by Lech Kulikowski »

Hello,

Please check the following topic:
viewtopic.php?f=8&t=131

Also, instead of the
myReport = null;

should be
myReport.Dispose();
myReport = null;
GC.Collect();
GC.WaitForPendingFinalizers();
GC.Collect();

Thank you.
r.bianco
Posts: 75
Joined: Thu Oct 27, 2016 2:06 pm

Re: Deallocate memory

Post by r.bianco »

It works!
Thanks a lot.
Soft System srl
Andrew
Posts: 4107
Joined: Fri Jun 09, 2006 3:58 am

Re: Deallocate memory

Post by Andrew »

Hello,

Okay, great!
Post Reply