D
Doug Crawford
I have a windows form where I am dynamically creating and destroying
TextBox controls. Each time I create a TextBox I also set up up a Click
event handler. If I remove the TextBox from the form's Controls
container and then call Dispose() will it automatically remove my Click
event handler and thus make the TextBox available for Garbage
collection? Or do I have to explicitly remove the Click handler myself
before calling Dispose()?
TextBox controls. Each time I create a TextBox I also set up up a Click
event handler. If I remove the TextBox from the form's Controls
container and then call Dispose() will it automatically remove my Click
event handler and thus make the TextBox available for Garbage
collection? Or do I have to explicitly remove the Click handler myself
before calling Dispose()?