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。
  • 来源:互联网摘选更新时间:2025-01-19 22:16:35

  • 重点词汇
  • has been已经;
  • ifconj.如果;假若;倘若;当;无论何时;每次;与will或would连用,表示客气地请求;即使,虽然;〈口〉是否;假设;
  • collectedadj.镇定的;收集成的;
  • orconj.或,或者;还是;不然,否则;左右;
  • alreadyadv.早已,已经;先前;
  • someonepron. 某人,有人;
  • becauseconj. 因为,由于;
  • hasv. 有( have的第三人称单数 );(亲属关系中)接受;拿;买到;
  • eitherdet./pron. (两者中的)任何一个;(两者中的)每个,各方
  • theart.这个;指已提到或易领会到的人或事物;指独一无二的、正常的或不言而喻的人或事物;用以泛指;与形容词连用,指事物或统称的人;用于姓氏的复数形式前,指家庭或夫妇;(指特定用途的事物)足够,恰好;每,一;当前的,本,此;(重读,表示所指的为知名或重要的人或事物)
  • 相关例句
1、

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时删除那个映射而消除死映射。

互联网摘选

2、

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

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

互联网摘选

3、

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根据需要使用。

互联网摘选

4、

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

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

互联网摘选

5、

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

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

互联网摘选

6、

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

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

互联网摘选

7、

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

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

互联网摘选

8、

Garbage collector scans the long weak reference table.

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

互联网摘选

9、

A long weak reference is created.

则创建长弱引用。

provided by jukuu

10、

We'd better hurry or we'll be in for it.

我们最好赶快,不然要受罚的。

《牛津高阶英汉双解词典》

11、

We'd better take a taxi.

我们最好乘出租车。

《牛津高阶英汉双解词典》

12、

We'd recommend you to book your flight early.

我们建议你早点儿预订航班。

《牛津高阶英汉双解词典》

13、

We'd better hurry or we'll miss the train.

我们最好快点,否则就赶不上火车了。

《牛津高阶英汉双解词典》

14、

We'd been to hell and back together and we were still good friends.

我们曾经患难与共,现在依然是好友。

《牛津高阶英汉双解词典》

15、

Suddenly it clicked ─ we'd been talking about different people.

我们突然领悟到原来我们谈论的不是同一个人。

《牛津高阶英汉双解词典》

16、

We'd better leave now or we'll miss the bus.

我们最好现在就走,不然就赶不上公共汽车了。

《牛津高阶英汉双解词典》

17、

Bring the family round one evening; we'd love to meet them.

哪天晚上带全家人来坐坐,我们很想见见他们。

《牛津高阶英汉双解词典》

18、

I think we'd better drop the subject.

我认为我们最好不要再谈这个话题。

《牛津高阶英汉双解词典》

19、

We'd better hear what they have to say.

我们最好还是听听他们有什么话要说。

《牛津高阶英汉双解词典》

20、

The tide is turning ─ we'd better get back.

涨潮了,我们最好回去吧。

《牛津高阶英汉双解词典》

  • 今日热词
  • 热门搜索

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

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