This is a slightly strange test case: you use reflection to access "this". By definition, "this" is alive when used in an instance method of the declaration class, so there will be no GCed.
But what's more, reflection just allows you to manipulate fields, etc. in objects to which you already have links. What is the key - if you can give the Flip instance for validation, you obviously still have a reference to the object, so it remains alive.
Trent Gray-Donald
source share