Hello,
In my application (VB.Net) I use the controls of the NetAdvantage Windows Forms with customized styles.
For that, I created new controls which inherits of the original controls of Infragistics.
In the case of Infragistics.Win.UltraWinToolbars.UltraToolbarsManager, when I disposed, the method "Infragistics.Win.UltraWinToolbars.Ribbon.get_Metrics()" still references the parent form, finished in a memory leak.
Here is the code I used for create the control:
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _ Partial Class InheritedToolbarsManager Inherits Infragistics.Win.UltraWinToolbars.UltraToolbarsManager
<System.Diagnostics.DebuggerNonUserCode()> _ Protected Overrides Sub Dispose(ByVal disposing As Boolean) Try If disposing AndAlso components IsNot Nothing Then components.Dispose() End If Finally MyBase.Dispose(disposing) End Try End Sub
Private components As System.ComponentModel.IContainer
<System.Diagnostics.DebuggerStepThrough()> _ Private Sub InitializeComponent() CType(Me, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me, System.ComponentModel.ISupportInitialize).EndInit() End Sub
End Class
I use the .NET Memory Profiler for identification of Memory Leaks:
"This instance is disposed and still indirectly rooted by an EventHandler. This often indicates that the EventHandler has not been properly removed and is a common cause of memory leaks.
The instances below are directly rooted by EventHandler(s). Investigate them to get more information about this issue."
Infragistics.Win.UltraWinToolbars.Ribbon.get_Metrics()Infragistics.Win.UltraWinToolbars.Ribbon.OnFormCaptionChanged()Infragistics.Win.UltraWinToolbars.UltraToolbarsManager.OnFormTextChanged( object,EventArgs )Infragistics.Win.UltraWinToolbars.UltraToolbarsManager.HookFormEvents()Infragistics.Win.UltraWinToolbars.UltraToolbarsManager.OnFormLoad( object,EventArgs )System.Windows.Forms.Form.OnLoad( EventArgs )
You can me help discover what is wrong in the inheritance?
Thanks
I am checking about the progress of this issue. Please let me know If you need any further assistance on this.
Our Consulting team could help you in this and such situations. This is part of their services, please take a look at the following links:
http://es.infragistics.com/help/support-policies/
and http://d3.infragistics.com/services/consulting-services/.
Please do not hesitate to contact me if you need any additional assistance.
I did tests with component UltraToolbarsManager and could not reproduce the problem.
Can you help me identify what's wrong?
Hello patriciarosa,
Please note, that you would be responsible for handling inherited components, we are supporting the controls and components which are coming with our tool set.
Could you reproduce this memory leak with our 'UltraToolbarsManager' component?