Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
40
Programmatic UltraWebGrid Memory Leak
posted

After profiling my application, I have found that my ASP .NET web application is never freeing up programatically created UltraWebGrids. The ASPX code and the Page_Load's pseudo are below.

Using ANTS Profiler I navigated to the page that has the grid multiple times then forced GC and took a snapshot. I found that all of the programatically created Infragistics controls were still "live".

How do I force the Infragistics controls to be GC'd?

Page_Load Pseduo-code {

grid.Clear();

grid.Columns.Clear();

grid.Rows.Clear();

// programattically create UltraWebGridColumns, UltraGridRows, and UltraGridCells and setting their styles, and other attributes.

}

 

 

 

<asp:Content ID="ContentPlaceHolder_FooTab" runat="server" ContentPlaceHolderID="ContentPlaceHolder_FooTab">
    <asp:Panel ID="pnlFooPopup" runat="server" Style="display: none;" CssClass="modalPopup framePopup"
        Width="300px" Height="300px">
        <iframe id="iframeFooPopup" frameborder="0" width="100%" height="100%" src="PopupEmpty.htm">
        </iframe>
    </asp:Panel>
    <div class="tabContent">
        <asp:UpdatePanel ID="upd_Foo" runat="server" EnableViewState="true" RenderMode="Block">
            <ContentTemplate>
                <igtbl:UltraWebGrid ID="grd_Foo" runat="server" Width="100%" OnDeleteRow="grd_Foo_DeleteRow">
                    <Bands>
                        <igtbl:UltraGridBand>
                            <AddNewRow View="NotSet" Visible="NotSet">
                            </AddNewRow>
                        </igtbl:UltraGridBand>
                    </Bands>
                    <DisplayLayout AllowColumnMovingDefault="None" AllowDeleteDefault="No" AllowColSizingDefault="Fixed"
                        AllowSortingDefault="No" AllowUpdateDefault="Yes" BorderCollapseDefault="Separate"
                        Name="UltraWebGrid1" RowSelectorsDefault="No" SelectTypeRowDefault="Extended"
                        StationaryMargins="HeaderAndFooter" StationaryMarginsOutlookGroupBy="True" TableLayout="Fixed"
                        Version="4.00" GridLinesDefault="NotSet" RowAlternateStylingDefault="False" ColWidthDefault="">
                        <FrameStyle BackColor="Window" BorderColor="InactiveCaption" Width="100%" />
                        <RowStyleDefault Cursor="Default" Font-Strikeout="False" />
                        <HeaderStyleDefault Wrap="true" />
                        <AddNewBox Hidden="False">
                            <BoxStyle BackColor="Window" BorderColor="InactiveCaption" BorderStyle="Solid" BorderWidth="1px">
                                <BorderDetails ColorLeft="White" ColorTop="White" WidthLeft="1px" WidthTop="1px" />
                            </BoxStyle>
                        </AddNewBox>
                        <ActivationObject BorderColor="" BorderWidth="">
                        </ActivationObject>
                    </DisplayLayout>
                </igtbl:UltraWebGrid>
            </ContentTemplate>
        </asp:UpdatePanel>
    </div>
</asp:Content>

Parents Reply Children
No Data