Memory and GDI objects leak

Posted by: ilia on 18 May 2018, 2:13 am EST

    • Post Options:
    • Link

    Posted 18 May 2018, 2:13 am EST

    I’m trying to display 1000 times blank AR12.SectionReport using the AR12.Viewer (last Hotfix).

    Because memory and GDI objects growth, the application crashes.

    The sample attached. WindowsApp1.zip

  • Posted 20 May 2018, 8:44 pm EST

    Hello IliA,

    Please dispose the viewer object in form closing event. Please refer the attached sample.

    Thanks,

    Mohit

    Modified_Sample.zip

  • Posted 7 May 2019, 9:52 pm EST

    Can you give an example for ASP.NET Web forms with ActiveReports-v12.2.16449.0?

  • Posted 8 May 2019, 9:28 pm EST

    Hello,

    I have replied on S1 case 378251. Please continue the discussion on S1 to avoid the confusion.

    Thanks.

  • Posted 24 June 2019, 8:06 pm EST

    What is S1 to continue the discussion?

    How can I get permission to view this issue?

  • Posted 25 June 2019, 5:34 pm EST

    Ilia,

    You can’t get permission to view the particular case. Only respected user can see their case.

    Here’s the reply which is sent to the user on S1:

    You shouldn’t dispose the report object if you are using the Web Viewer. The report processed after the aspx page is rendered to the PDf content and sent to the browser. You do not need to set any memory optimizing code for WebViewer since it is handled by AR side.

    Could you please try with the following code:

    
    
    protected void Page_Load(object sender, EventArgs e)
            {
                if(!IsPostBack)
                {
                    Page.ClientScript.RegisterStartupScript(typeof(String), "DisableBeforeUnload", @"<script>window.onbeforeunload = null;</script>");
                    rpt = new GrapeCity.ActiveReports.SectionReport();
                    System.Xml.XmlTextReader xtr = new System.Xml.XmlTextReader(Server.MapPath("") + "\\SectionReport1.RPX");
                    rpt.LoadLayout(xtr);
                    xtr.Close();
                    WebViewer1.Report = rpt;
                }
               
            }
    
    

    Thanks.

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels