weak reference

[wi:k ˈrefrəns]
  • weak reference
  • 释义

    弱引用;弱参考

纠错 数据更新时间:2025-11-14 05:36:41
1、

It would be nice if there was a way to be notified when the referent of a weak reference is garbage collected, and that is what reference queues are for.

如果有一种方法可以在弱引用的referent被垃圾收集时发出通知就好了,这就是引用队列的作用。

互联网摘选

2、

Garbage collector scans the long weak reference table.

垃圾收集器扫描长弱引用表。

互联网摘选

3、

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.

如果一个指针指向一个不在图中的对象,那么此对象就是一个不可到达的对象,垃圾收集器就将短弱引用表相应的槽置空。

互联网摘选

4、

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

从以上是否能看出,一个对象不能同时具有软引用和弱引用?

互联网摘选

5、

If a finalizer ( Final queue) is associated with a soft or weak reference, then only after the soft or weak reference is removed is the finalizer removed on the next GC pass that is run.

如果一个finalizer(Final查询)与一个soft或weak引用相关,那么只有当这个soft或weak引用删除后,这个finalizer才会在所运行的下一个GC pass上被删除。

互联网摘选

6、

A long weak reference is created.

则创建长弱引用。

provided by jukuu

7、

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

在短周期对象销毁后,长周期对象对短周期对象的弱引用依然会长久保留下来。

互联网摘选

8、

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

因为垃圾回收器是一个优先级很低的线程,所以弱引用对象也不一定会马上就会被回收。

互联网摘选

9、

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.

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

互联网摘选

10、

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

如果已经分配了最低数量的对象,则对象的弱引用被放置到队列中。

互联网摘选

11、

Using a weak reference here keeps objects that are above the minimum around as long as possible, but makes them available for GC as required.

在此使用弱引用可以使除最低数量对象以外的对象尽可能久地保持活跃状态,但是使它们可供GC根据需要使用。

互联网摘选

12、

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

弱引用是对一个对象(称为referent)的引用的持有者。

互联网摘选

13、

Dead mappings could be eliminated by periodically scanning the Map, calling get() on each weak reference, and removing the mapping if get() returns null.

可以通过周期性地扫描Map,对每一个弱引用调用get(),并在get()返回null时删除那个映射而消除死映射。

互联网摘选

14、

The Entry type, which is used to store the key-value mapping, extends WeakReference, so when expungeStaleEntries() asks for the next expired weak reference, it gets back an Entry.

用于存储键-值映射的Entry类型扩展了WeakReference,因此当expungeStaleEntries()要求下一个失效的弱引用时,它得到一个Entry。

互联网摘选

15、

If the weak reference has been cleared ( either because the referent has already been garbage collected or because someone called WeakReference. clear()), get() returns null.

如果弱引用被清除了(不管是referent已经被垃圾收集了,还是有人调用了WeakReference.clear()),get()会返回null。

互联网摘选

  • 相关词组
  • 今日热词
  • 热门搜索
  • big mom[bɪɡ mɒm] 毕古麻姆
  • ounce[aʊns] n.盎司;<口>少量,一点儿;雪豹;
  • enthusiastic[ɪnˌθjuːziˈæstɪk] adj.非常感兴趣的,热心的;
  • Scotland[ˈskɒtlənd] n.苏格兰(英国的一部分,在大不列颠岛北部);
  • could[kəd] aux.能够,打算;用于假设语气的条件句;用于虚拟语气的结论句;modal.可能会,有时会;(用于表示对某人的行为的厌恶)能,可以;(询问是否可做某事)能,可以;(礼貌地请求别人做事以及提供或建议某事物时)能,可以;能,会;(用于建议)可以;好像,仿佛;(强调感觉)真想
  • under[ˈʌndə(r)] prep.在…下面;受…影响;由…控制;在…过程中;由…造成;根据,按照;少于,不足;用,以;adv.在下面;在水下;少/小于;在昏迷中;
  • computer[kəmˈpjuːtə(r)] n.计算机,电脑;
  • vws 大众汽车;冷冻水系统;威立雅水务技术;体育部;威立雅水务技术公司;
  • crew[kruː] n.(飞机、轮船等上的)全体工作人员;技术团队;一组人;划船队;赛船运动;v.当船员;
  • Siri[siri] n.[人名] 西丽;苹果智能语音助手;;iPhone上的语音控制功能;
  • accuse[əˈkju:z] v.指责,谴责;指控;
  • tory burch[ˈtɔːri bɜrtʃ] 托里·伯奇;

纳米英语英语词典(dict.nm3.cn)为您提供在线翻译英语词典单词大全英译汉汉译英等英语服务!可按单词字数词义分类查询。支持lj:关键词格式查询例句。

用户反馈
请选择反馈类型(可多选):
您的联系方式:
反馈内容:
提交成功 小编会尽快处理
回到顶部
点击反馈