I went through the example of a finalizer guardian published on Stack Overflow, I have a few questions regarding this:
Why do we need to create a Guardian object? Why not just override the finalizer? (since all classes are subclasses of the class Object).
At what point is the Guardian object created? I assume this is during class loading.
I did not understand the syntax of the generated guardian object. A function with a variable declaration is declared. What is this paradigm called in Java?
source share