Page 1 of 1

Memory Leak PdfExport

Posted: Tue Feb 23, 2016 7:20 pm
by thalescouto
Hello,

I'm building an app that renders a report and then export it to Pdf.

Sample code:

Code: Select all

public byte[] returnPdf(string fileName)
{
    StiReport report = StiReport.GetReportFromAssembly(fileName);
    report.Render();
    if (!Path.HasExtension(pdfName))
    pdfName += ".pdf";

    using (MemoryStream pdfFile = new MemoryStream())
    {
        report.ExportDocument(StiExportFormat.Pdf, pdfFile);
        pdfFile.Position = 0;
        return pdfFile.ToArray();
    }
}
It is working fine, but it's leaving a memory leak every time this function is executed (something near 700kb).
I was searching on forums and I found this problem that looks like exactly like mine, but there werent given any solutions: https://translate.google.com/translate? ... %26t%3D377

The leaks I'm getting are from the same two classes: Stimulsoft.Report.Export.StiBidirectionalConvert and Stimulsoft.Report.Export.PdfFonts.

Could anyone please help me?
Thanks in advance.

Re: Memory Leak PdfExport

Posted: Wed Feb 24, 2016 10:55 am
by HighAley
Hello.

Could you specify what version of our product you use?
In these classes there are static arrays. They are created just once.
Are you sure that the cause are these two classes?
Could you send us a sample project that reproduces the issue.

Than you.