G
Guest
I guess I'm not exactly sure when or how to dispose controls when I
dynamically add/remove controls.
Let's say I have a user control, and whenever a certain button is
pressed, I delete all the controls on the user control and add a bunch
of new controls to it. Do I really need to Dispose all of the controls
that are being removed?
I assume that we are supposed to dispose them, but what kind of
problems might realistically occur if they are not disposed.
Do controls such as Forms or Panels dispose all the controls that are
in their Controls collection when they are disposed?
Thanks.
dynamically add/remove controls.
Let's say I have a user control, and whenever a certain button is
pressed, I delete all the controls on the user control and add a bunch
of new controls to it. Do I really need to Dispose all of the controls
that are being removed?
I assume that we are supposed to dispose them, but what kind of
problems might realistically occur if they are not disposed.
Do controls such as Forms or Panels dispose all the controls that are
in their Controls collection when they are disposed?
Thanks.