If we remove the visual component in a similar way:
this.Controls.Remove(Label1) , then the memory that was allocated for it is released? Thank you in advance!Removes the link to Label1 in the Controls collection. When all references to Label1 deleted, Label1 will become a candidate for deletion from memory as an object, and the garbage collector will someday reach it.
Source: https://ru.stackoverflow.com/questions/12585/
All Articles