• 因为垃圾回收器一个优先级线程所以引用对象不一定会马上就回收

    GC is a thread of very low priority, so a weak reference object may not be collected immediately.

    youdao

  • 引用对象将会保持指向一个超出作用域或者置空对象引用直到确实垃圾回收删除。

    A weak reference object will keep a reference to an object that went out of scope or was set to null, until it is actually deleted by the garbage collector.

    youdao

  • 这些持有引用允许连接这样被跟踪对象只有方面引用它们时候垃圾收集掉

    These maps hold weak references to allow tracked objects like connections to be garbage collected when they are referenced only by the aspect.

    youdao

  • 前一期文章中我们看到了引用如何可以应用程序提供对象程序使用时另一种到达该对象方法,但是不会延长对象生命周期。

    In the previous installment, we saw how weak references can provide an application with an alternate means of reaching an object while it is used by the program, but without prolonging its lifetime.

    youdao

  • 如果已经分配最低数量对象对象引用被放置到队列中

    If the minimum number of objects is already allocated, then a weak reference to the object is enqueued.

    youdao

  • 使用这个if之后obj之后,应该ob j设置null,从而垃圾收集器能够回收这个对象充分利用引用

    After working with obj after this if block, you should set obj to null to enable the garbage collector to reclaim this object to take full advantage of weak references.

    youdao

  • WeakHashMap实现展示了引用一种常见用法——一些内部对象扩展WeakReference

    The implementation of WeakHashMap illustrates a common idiom with weak references — that some internal object extends WeakReference.

    youdao

  • 引用告诉垃圾收集器如果某个对象除了弱引用之外没有其他任何引用应该收集对象

    Weak references tell the garbage collector that it should collect an object if there are no references to it other than the weak reference.

    youdao

  • 处理引用之后可及对象集合识别——这样对象存在引用引用

    After processing the soft references, the set of weakly reachable objects is identified — objects for which no strong or soft references exist.

    youdao

  • 哪怕及时释放掉了实际对象,但WPF引用数组还是会继续持有引用就导致内存泄漏

    Even when the actual objects are being released in a timely manner, WPF's arrays of weak references hang around and under stress become the memory leak.

    youdao

  • 引用一样,引用通过利用垃圾收集器作出缓存回收决策方面帮助有助于防止应用程序出现对象游离

    Soft references, like weak references, can help applications prevent object loitering by enlisting the aid of the garbage collector in making cache eviction decisions.

    youdao

  • 周期对象销毁周期对象对短周期对象引用依然会长久保留下来

    The weak reference from the long-lived object to the short-lived object is kept long after the short-lived object has been destroyed.

    youdao

  • 对象(weaklyreachable):不是可及对象也不是软可及对象并且能够通过引用访问对象

    Weakly reachable: an object that is not strongly or softly reachable and can be accessed through a weak reference.

    youdao

  • 对象(phantomly reachable):不是可及对象、软可及对象,也不是可及对象已经结束的,可以通过引用访问对象

    Phantomly reachable: an object that is not strongly, softly, or weakly reachable, has been finalized, and can be accessed through a phantom reference.

    youdao

  • 一方面,创建对象引用时,完全没有扩展referent生命周期,只是对象仍然存活的时候,保持到达方法

    On the other hand, when you create a weak reference to an object, you do not extend the lifetime of the referent at all; you simply maintain an alternate way to reach it while it is still alive.

    youdao

  • 而且内存中的一个对象可以多个引用(可以引用引用引用引用)引用

    Furthermore, an object in memory can be referenced by multiple references that could be strong, soft, weak, or phantom. Before proceeding further, let's look at some terminology.

    youdao

  • 引用一个对象(称为referent)的引用持有者

    A weak reference is a holder for a reference to an object, called the referent.

    youdao

  • 关键之处在于,垃圾收集器运行时如果碰到对象释放WeakReference引用对象

    The key point is that when the garbage collector runs, if it encounters a weakly reachable object, it will free the object the WeakReference refers to.

    youdao

  • 以上是否能看出一个对象不能同时具有引用引用

    From above shall we say that an object can't have a soft reference and a weak reference at the same time?

    youdao

  • 在必要使用引用因为终止后对象状态不可预知的。

    Use long weak references only when necessary as the state of the object is unpredictable after finalization.

    youdao

  • 引用特别适合以下对象占用大量内存通过垃圾回收功能回收以后很容易重新创建。

    Weak references are useful for objects that use a lot of memory, but can be recreated easily if they are reclaimed by garbage collection.

    youdao

  • 一点引用一个对象强迫留在记忆里

    The point of a weak reference is to refer to an object without forcing it to stay in memory.

    youdao

  • 引用允许应用程序访问对象同时允许垃圾回收收集相应对象

    A weak reference permits the garbage collector to collect the object while still allowing the application to access the object.

    youdao

  • 如果指针指向不在中的对象那么对象就是一个不可到达的对象垃圾收集器就将引用相应置空

    If a pointer pointing to an object not in the graph, then the object is not a reachable object, and then garbage collector sets the slot to null in the short weak reference table.

    youdao

  • 如果指针指向不在中的对象(注意此时图中已包含Finalize可到达对象),那么对象就是一个不可到达的对象,垃圾收集器就将引用相应的槽置空

    If a pointer pointing to an object not in the graph, then the object is not a reachable object, and then garbage collector sets the slot to null in the long weak reference table.

    youdao

  • 如果指针指向不在中的对象(注意此时图中已包含Finalize可到达对象),那么对象就是一个不可到达的对象,垃圾收集器就将引用相应的槽置空

    If a pointer pointing to an object not in the graph, then the object is not a reachable object, and then garbage collector sets the slot to null in the long weak reference table.

    youdao

$firstVoiceSent
- 来自原声例句
小调查
请问您想要如何调整此模块?

感谢您的反馈,我们会尽快进行适当修改!
进来说说原因吧 确定
小调查
请问您想要如何调整此模块?

感谢您的反馈,我们会尽快进行适当修改!
进来说说原因吧 确定