VB.Net应用程序内存泄漏,对象被网格打开?
我有一个用VB.Net编写的大型、复杂的Windows窗体应用程序。用户遇到一些内存问题,并使用JetBrains dotTrace Profiler尝试清除其中一些问题 还有什么东西把我的一些东西打开了。我有一个“Customer”对象,它有一个VB.Net应用程序内存泄漏,对象被网格打开?,vb.net,memory,dottrace,Vb.net,Memory,Dottrace,我有一个用VB.Net编写的大型、复杂的Windows窗体应用程序。用户遇到一些内存问题,并使用JetBrains dotTrace Profiler尝试清除其中一些问题 还有什么东西把我的一些东西打开了。我有一个“Customer”对象,它有一个InvoiceLineItem的Generic.List。此项基本上是绑定到网格控件(ConponentOne FlexGrid)的对象,该控件具有用于显示数据的只读属性,例如: Public Class InvoiceLineItem Private
InvoiceLineItem
的Generic.List
。此项基本上是绑定到网格控件(ConponentOne FlexGrid)的对象,该控件具有用于显示数据的只读属性,例如:
Public Class InvoiceLineItem
Private _customer as Customer
Private _charge as Charge
Sub New(Customer as Customer, Charge as Charge)
_customer = Customer
_charge = Charge
End Sub
Public ReadOnly Property Name as String
Return _customer.Name
End Property
Public ReadOnly Property ItemName as String
Return _charge.Name
End Property
Public ReadOnly Property Amount as Decimal
Return _charge.Amount
End Property
End Class
等等
此对象看起来好像没有从FlexGrid中释放
Flexgrid位于子窗体上,如主窗体所示。当关闭子窗体时,内存探查器显示该窗体仍然被引用。当我在dotTrace中单击“最短路径”时,将显示下面的路径
这似乎是Customer中唯一具有根路径的对象
在我的对象或集合之间没有在此表单中进行的自定义事件处理,也没有处理任何内容
如何进一步排除故障?我发现了问题。FormClosing事件正在其他地方处理并测试是否有未保存的数据,对表单的引用保存在该函数中,而不是发布