G
Glenn
I am confused about when a form is unloaded, if ever. I have forms loading
as MDI forms that have a withevents reference to a global class raising
events. When the forms close, the closed event fires, etc., but the raised
event continues to be captured in the forms. The form is opened from a sub
on the main form, like
Dim frm as frmMine
frm = new frmMine
frm.show
The frm is a local variable to the sub so goes out of scope with the sub.
Why would this continue to fire, and how can I get the form to unload. In
general, I have tested a few sample apps that have simply an MDI that opens
a form and when the form has some databound controls linked to a dataset,
when the form's close the memory use stays the same or even increases:
reopen the form and the memory increases, repeat over and over and the
memory grows. Calling gc.collect has no effect, but if I reduce the form to
hidden and re-open then the memory drops down to very little and when I
re-open the form it remains small. What gives?
Thanks for any help, I am fairly new to .Net.
Glenn
as MDI forms that have a withevents reference to a global class raising
events. When the forms close, the closed event fires, etc., but the raised
event continues to be captured in the forms. The form is opened from a sub
on the main form, like
Dim frm as frmMine
frm = new frmMine
frm.show
The frm is a local variable to the sub so goes out of scope with the sub.
Why would this continue to fire, and how can I get the form to unload. In
general, I have tested a few sample apps that have simply an MDI that opens
a form and when the form has some databound controls linked to a dataset,
when the form's close the memory use stays the same or even increases:
reopen the form and the memory increases, repeat over and over and the
memory grows. Calling gc.collect has no effect, but if I reduce the form to
hidden and re-open then the memory drops down to very little and when I
re-open the form it remains small. What gives?
Thanks for any help, I am fairly new to .Net.
Glenn