Phantom Referenced Objects
问题 Phantom References serve for post-mortem operations. The Java specification states that a phantom referenced object will not be deallocated until the phantom-reference itself is cleaned. My question is: What purpose does this feature (object not deallocated) serve? (The only idea i came up with, is to allow native code to do post-mortem cleanup on the object, but it isn't much convincing). 回答1: The only good use-case I can think of, that would prevent deallocation, is one where some kind of