title: vb.net why after a form is closed, class members still occupy memory?
body: <p>I define some global variables of a class as follows:</p>
  
  <pre><code>Private Class MyClass
  Private var1 as Decimal
  Private list1 as List(Of string)
  Private list2 as List(Of string)
  ....'Subs here
  End Class
  </code></pre>
  
  <p>But I found that after this form is closed, all above variables, var1, list1, list2 still exist in memory. I thought they should be collected by gc since the form is already disposed as I confirmed.</p>
  
  <p>Add: I have monitored half an hour after the form is closed. But these variables are not collected by gc. I have an automatic update procedure on the form which uses above variables. Since the above variables still hold values, the automatic update procedure is always called which causes exception. (One quick fix is to check if form.isDisposed in update procedure. But I do not think this is elegeant. Besides, these variables occupy memory.) </p>
  
  <p>Thanks</p>