rahulpandey87 / mb-unit

Automatically exported from code.google.com/p/mb-unit
1 stars 0 forks source link

ToolStripButton Binding does not dipose properly #646

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. use a ToolStripButton with Binding 
2. Bind something to it
3. Close the form

What is the expected output? What do you see instead?
Expect: The form is properly disposed. 
See: The form is disposed, but not garbage Collected, because of ToolstipButton

What version of the product are you using? On what operating system?

Please provide any additional information below.

Fix: 
Implement dispose on the ToolStripButton: 

  Protected Overrides Sub Dispose(ByVal disposing As Boolean)
    If disposing Then
      _DataBindings.Clear()
      _DataBindings = Nothing
      _BindingContext = Nothing
    End If
    MyBase.Dispose(disposing)
  End Sub

Original issue reported on code.google.com by gser...@gmail.com on 30 Mar 2010 at 1:54

GoogleCodeExporter commented 8 years ago

Original comment by grahamr...@gmail.com on 30 Mar 2010 at 4:46