I'm trying to run down a memory leak in a windows forms application. I'm looking now at a form which contains several embedded forms. What worries me is that the child forms, in their constructor, take a reference to the parent form, and keep it in a private member field. So it seems to me that come garbage-collection time:
Parent has a reference to the child form, via the controls collection (child form is embedded there). Child form is not GC'd.
Child form has a reference to the parent form, via the private member field. Parent form is not GC'd.
Is this an accurate understanding of how the garbage collector will evaluate the situation? Any way to 'prove' it for testing purposes?