Memory leak SF BO with DevExpress ASPxDataGridView


Author
Message
ChanKK
ChanKK
StrataFrame User (414 reputation)StrataFrame User (414 reputation)StrataFrame User (414 reputation)StrataFrame User (414 reputation)StrataFrame User (414 reputation)StrataFrame User (414 reputation)StrataFrame User (414 reputation)StrataFrame User (414 reputation)StrataFrame User (414 reputation)
Group: Forum Members
Posts: 190, Visits: 1.3K
Hi
I have debug and have temporary fix for this issue. I changed code in SF as below. What I tried to do is expose the instance of BusinessBindingSource used by WBBSEnumerator, then on page_unload, dispose it. At this moment, it doesn't solve my issue. I am in the progress to do more detailed testing to see if any impact to data editing inside gridview. Hope it helps SF team to speed up the permanent fix. Thank you

Public Structure WBBSEnumerator
            Implements IEnumerator
            Implements IEnumerable

#Region " Constructors "

            ''' <summary>
            ''' Initializes a new instance of this Enumerator structure.
            ''' </summary>
            ''' <param name="bo"></param>
            ''' <param name="start"></param>
            ''' <param name="count"></param>
            ''' <remarks></remarks>
            Public Sub New(ByVal bo As BusinessLayer, ByVal start As Integer, ByVal count As Integer)
                Me._BBS = bo.GetEnumerable(True, False)
                Me._BusinessObjectEnumerator = Me._BBS.GetEnumerator()
                Me._CurrentCount = 0
                Me._MaxCount = count
                Me._StartIndex = start
            End Sub



''' More code

            Public ReadOnly Property BBS() As BusinessBindingSource
                Get

                    Return CType(Me._BBS, BusinessBindingSource)
                End Get
            End Property
        End Structure
ChanKK
ChanKK
StrataFrame User (414 reputation)StrataFrame User (414 reputation)StrataFrame User (414 reputation)StrataFrame User (414 reputation)StrataFrame User (414 reputation)StrataFrame User (414 reputation)StrataFrame User (414 reputation)StrataFrame User (414 reputation)StrataFrame User (414 reputation)
Group: Forum Members
Posts: 190, Visits: 1.3K
any update?
Thank you
ChanKK
ChanKK
StrataFrame User (414 reputation)StrataFrame User (414 reputation)StrataFrame User (414 reputation)StrataFrame User (414 reputation)StrataFrame User (414 reputation)StrataFrame User (414 reputation)StrataFrame User (414 reputation)StrataFrame User (414 reputation)StrataFrame User (414 reputation)
Group: Forum Members
Posts: 190, Visits: 1.3K
I am totally agree that SF really helpful. 
However, my customer and management want solution. Without that, everything is nothing for them.

Once again, very much appreciated on kindly support
Peter Jones
Peter Jones
Advanced StrataFrame User (504 reputation)Advanced StrataFrame User (504 reputation)Advanced StrataFrame User (504 reputation)Advanced StrataFrame User (504 reputation)Advanced StrataFrame User (504 reputation)Advanced StrataFrame User (504 reputation)Advanced StrataFrame User (504 reputation)Advanced StrataFrame User (504 reputation)Advanced StrataFrame User (504 reputation)
Group: Forum Members
Posts: 386, Visits: 2.1K
Hi,

We use SF / DX combination for everything and have no problems but we don't use web forms. Anyway that's not why I'm posting. I just wanted to say that I think SF support is simply outstanding. Even though we don't use it much it is really nice to know such support depth is there.

Cheers, Peter
Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
Same issue, same problem.  When a handler is not released, the object cannot be disposed.  Thus you get a memory leak.  That is why it is so important for all controls to work within the confines of the framework and interfaces used therein.  In this example, the DevExpress controls that use attach to the IEnumerable interface are not releasing the handlers as expected.  Thus, a memory leak.  Again, we will see if there is something we can do to accommodate all 3rd party controls.  But here is one thing that I have already proven.  We can use a Custom BBS and an XtraReport with no memory leak whatsoever.  This is a very common control and combination of tools used by SF users.  Some of our largest users also use the XtraReports within massive applications.  And if they were experiencing memory leaks like you have described, there would be mass chaos. The DevExpress web grid is another story, however, as most people take a different approach, as I have mentioned in previous dealings with your current issue.

Regardless, I would love nothing more than to find a solution on our side so we can get this behind us.
ChanKK
ChanKK
StrataFrame User (414 reputation)StrataFrame User (414 reputation)StrataFrame User (414 reputation)StrataFrame User (414 reputation)StrataFrame User (414 reputation)StrataFrame User (414 reputation)StrataFrame User (414 reputation)StrataFrame User (414 reputation)StrataFrame User (414 reputation)
Group: Forum Members
Posts: 190, Visits: 1.3K
Hi
I hope I didn't defocus you, I need solution on memory leak which happen to ASP.NET XtraReport as well. I am not sure if the same root cause as ASPxGridView.
Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
Which makes sense as this is a part of the IEnumerable interface to which the external controls bound to the WBBS or BBS can control the navigation of the object.  However, it is their responsibility to add and remove the handler.  The WBBS doesn't create the handler for the grid, the grid creates the handler.  Thus the crux of the problem.  We are going to see if there is a way for us, through reflection, to cut the ties to the control.  But at the moment the control is hanging on to the WBBS, not the other way around.
ChanKK
ChanKK
StrataFrame User (414 reputation)StrataFrame User (414 reputation)StrataFrame User (414 reputation)StrataFrame User (414 reputation)StrataFrame User (414 reputation)StrataFrame User (414 reputation)StrataFrame User (414 reputation)StrataFrame User (414 reputation)StrataFrame User (414 reputation)
Group: Forum Members
Posts: 190, Visits: 1.3K
OK.
Anyway, hope you found the solutions soon. 

BTW, as I informed earlier, I sent the sample project to Microsoft support, they feedback that BO.List_Changed event is not released. You can refer back my previous messages. HTH
Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
I did say dispose, but I should have said release a handler.  We are trying to determine what they are hanging on to.  For the record, we are not going to get into a back and forth with DevExpress with you as the middle-man.  We are still evaluating their grid to see if we can do anything that doesn't "break" all other environments.  This is what happened the last time we made this accommodation for you.
ChanKK
ChanKK
StrataFrame User (414 reputation)StrataFrame User (414 reputation)StrataFrame User (414 reputation)StrataFrame User (414 reputation)StrataFrame User (414 reputation)StrataFrame User (414 reputation)StrataFrame User (414 reputation)StrataFrame User (414 reputation)StrataFrame User (414 reputation)
Group: Forum Members
Posts: 190, Visits: 1.3K
Hi
May I know when should the GridView to dispose the WBBS's data? I asked DevExpress, with below reply:

The datasource should not be disposed of during the pagelife cycle. The grid might use the datasource object even in the PreRenderevent handler. And if you dispose of the datasource somewhere in the code, thegrid will not be able to use it anymore.

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search