V
Veerle
Suppose you have a self-written control A that contains some other
controls. Some of these controls are .NET controls, others are COM
controls.
When clicking a button in a form, control A is created at runtime and
added to the controls collection of the form. Later on when clicking
another button in this form control A is removed from the controls
collection of the form, its dispose method is called and it is set to
nothing.
But when I look at the memory usage before adding the control to the
form and after removing it, there is big difference, like some part of
control A is still in memory somewhere???
If you call the dispose method on a self-written control (in the
previous example control A), can I be sure that the controls on this
control are properly disposed as well? Even if these controls are COM
controls?
Any suggestions on how I can track down the problem?
controls. Some of these controls are .NET controls, others are COM
controls.
When clicking a button in a form, control A is created at runtime and
added to the controls collection of the form. Later on when clicking
another button in this form control A is removed from the controls
collection of the form, its dispose method is called and it is set to
nothing.
But when I look at the memory usage before adding the control to the
form and after removing it, there is big difference, like some part of
control A is still in memory somewhere???
If you call the dispose method on a self-written control (in the
previous example control A), can I be sure that the controls on this
control are properly disposed as well? Even if these controls are COM
controls?
Any suggestions on how I can track down the problem?