Using CreateReportInNewAppDomain, no improvement in assembly leak

Stimulsoft Reports.NET discussion
Post Reply
lpinho
Posts: 7
Joined: Fri Aug 30, 2019 10:13 am

Using CreateReportInNewAppDomain, no improvement in assembly leak

Post by lpinho »

Hi,
I read the binary layout of report from a DB (one layout represents one page, we have different data for each page, but the layout is the same):

Code: Select all

                                    StiReport stiReport = new StiReport();
                                    stiReport.LoadPackedReport(binaryLayout);
I then load the Variables, DataSource, BusinessObjects, Dictionary Variables, DataStore, call the Dictionary Synchronize, then add the Report to the subReports list.

First I had:
finalReport.SubReports.Add(stiReport, false, true);

But for each sub report I have an assembly being leaked at render time.
So, I tried to use:

finalReport.SubReports.Add(stiReport.CreateReportInNewAppDomain(), false, true);

But I get Serialization issues (ex: Type 'Stimulsoft.Report.Units.StiInchesUnit' in assembly 'Stimulsoft.Report, Version=2021.1.1.0, Culture=neutral, PublicKeyToken=ebe6666cba19647a' is not marked as serializable.)

This report can reach more than 300 pages representing a leak of more than 301 assemblies at each render.

Could you please help me?

Thanks
Sergio Museninni
Posts: 16
Joined: Wed Mar 17, 2021 6:04 pm

Re: Using CreateReportInNewAppDomain, no improvement in assembly leak

Post by Sergio Museninni »

lpinho wrote: Mon Mar 15, 2021 12:53 pm Could you please help me?
Hello
We could not reproduce this. Please send us a sample on which we will reproduce the issue.
Post Reply