Here is scenario.
FormA loads. ClassA is instantiated at the form class scope. User does something that causes event ClassA.SomeEvent to be handled by method FormA.SomeEventHandler() User closes FormA
Now what happens when the garbage collector makes its rounds?
Since FormA should be disposed, but a reference to it is made by ClassA.
ClassA is still referenced in the FormA scope.
So how is this handled?
The way .NET handles form closing, it removes all references to objects in its scope, which removes the reference to ClassA allowing ClassA to be collected, and then FormA no longer is referenced by ClassA so it can be collected?
.NET refuse to collect FormA because it's referenced by ClassA, and thus does not collect ClassA as well?
.NET collect FormA but refuse to collect ClassA because it has a handler attached to it's event (even though it no longer points to an existing object)?
My understanding is that either 1 or 2 is correct, and I am leaning towards 2, but don't doubt 1 or 3 are possible.