C
cronusf
Say you have one reference to a form, and that form has child
controls.
myForm = new MyForm();
Then you set myForm to null so that it is garbage collected:
myForm = null;
Is myForm really garbage collected? Because, don't its child controls
have references to myForm since they keep track of their parents? How
does the form get flagged for GC without having to iterate over all of
its children and manually removing them from the form?
controls.
myForm = new MyForm();
Then you set myForm to null so that it is garbage collected:
myForm = null;
Is myForm really garbage collected? Because, don't its child controls
have references to myForm since they keep track of their parents? How
does the form get flagged for GC without having to iterate over all of
its children and manually removing them from the form?