This is my entire test project. One form, one DataGridView and three buttons:

I have also tried binding to a list of Integers in case something odd was occurring with my custom class.


vb Code:
  1. Private myList As BindingList(Of TrackedSet)
  2.  
  3. Private Sub button1_Click(ByVal sender As Object, ByVal e As EventArgs)
  4.  
  5.     If (myList Is Nothing) Then
  6.         myList = New BindingList(Of TrackedSet)
  7.     End If
  8.  
  9.     ' Binding here needs two GC's to reclaim memory when unbinding
  10.     ' dgv.DataSource = myList
  11.  
  12.     Dim i As Integer
  13.     For i = 0 To 50000
  14.         myList.Add(New TrackedSet(i, "00000000001,123,abc"))
  15.     Next i
  16.  
  17.     ' Binding here allows memory to be reclaimed ok when unbinding
  18.     dgv.DataSource = myList
  19.  
  20. End Sub
  21.  
  22. Private Sub button2_Click(ByVal sender As Object, ByVal e As EventArgs)
  23.  
  24.     dgv.DataSource = Nothing
  25.     myList.Clear
  26.     myList = Nothing
  27.  
  28. End Sub
  29.  
  30. Private Sub button3_Click(ByVal sender As Object, ByVal e As EventArgs)
  31.  
  32.     GC.Collect
  33.  
  34. End Sub