JVM - Are WeakReferences collected in minor GC?
问题 I was wondering about that since that would make them less useful. If so, is there a way to make memory weakly referenced only "garbage" on major GC? 回答1: The javadoc does not specifically state what the "timescales" are for clearing / breaking WeakReference s. That would make the answer to your question (at least in theory) "it is implementation dependent". Indeed, the JLS spec and javadocs don't even mention major versus minor collections. The whole topic comes is in the "implementation