Each of the reference classes has a get method, and the ReferenceQueue class has a poll method.
每个引用类都有一个get方法,而Reference Queue类有一个poll方法。
This means that the garbage collector freed the memory for MyObject, enabling the WeakReference object to be placed on its ReferenceQueue.
这意味着垃圾收集器释放了MyObject占用的内存,从而使WeakReference对象可以被放在它的Reference Queue上。
When the heap object's finalize method is run and its memory freed, the SoftReference object is added to its ReferenceQueue, if it exists.
当heap对象的finalize方法被运行而且该对象占用的内存被释放,S of tReference对象就被添加到它的ReferenceQueue(如果后者存在的话)。
When the heap object's finalize method is run and its memory freed, the WeakReference object is added to its ReferenceQueue, if it exists.
当heap对象的finalize方法被运行而且该对象占用的内存被释放时,WeakReference对象就被添加到它的ReferenceQueue(如果后者存在的话)。
When the heap object's finalize method is run and its memory freed, the WeakReference object is added to its ReferenceQueue, if it exists.
当heap对象的finalize方法被运行而且该对象占用的内存被释放时,WeakReference对象就被添加到它的ReferenceQueue(如果后者存在的话)。
应用推荐