Another subclass of reference, soft references, fulfills a different but related purpose.
Reference的另一个子类——软引用——可满足一个不同却相关的目的。
Softly reachable: an object that is not strongly reachable and can be accessed through a soft reference.
软可及对象(softlyreachable):不是强可及对象,并且能够通过软引用访问的对象。
From above shall we say that an object can't have a soft reference and a weak reference at the same time?
从以上是否能看出,一个对象不能同时具有软引用和弱引用?
Soft Reference . When an object holds only soft references, GC collects it only if there is not enough memory.
软引用 。当一个对象只具有软引用时,垃圾回收器只在内存不足的时候才回收它。
We can fix the problems in LeakyChecksum by using a soft reference to manage the cached buffer, as shown in Listing 2.
通过使用一个软引用来管理高速缓存的缓冲区,可以解决LeakyChecksum中的问题,如清单2所示。
The key to whether a soft reference can be used is whether an application can recover from the loss of the data being cached.
是否可使用软引用的关键在于,应用程序是否可从大量缓存的数据恢复。
Weak and soft references both extend the abstract reference class (as do phantom references, which will be discussed in a future article).
弱引用和软引用都扩展了抽象的reference类(虚引用(phantomreferences)也一样,这将在以后的文章中介绍)。
CachingChecksum used a soft reference to cache a single object and let the JVM handle the details of when to evict the object from the cache.
CachingChecksum使用一个软引用来缓存单个对象,并让JVM处理从缓存中取走对象时的细节。
Just as with weak references, a soft reference can be created with an associated reference queue, and the reference is enqueued when it is cleared by the garbage collector.
正如弱引用一样,软引用也可创建为具有一个相关的引用队列,引用在被垃圾收集器清除时进入队列。
Reference queues are not as useful with soft references as with weak references, but they could be used to raise a management alert that the application is starting to run low on memory.
引用队列对于软引用来说,没有对弱引用那么有用,但是它们可以用于发出管理警报,说明应用程序开始缺少内存。
The idea of a SoftReference is that you hold a reference to an object with the guarantee that all of your soft references will be cleared before the JVM reports an out-of-memory condition.
SoftReference的原理是:在保持对对象的引用时保证在JVM报告内存不足情况之前将清除所有的软引用。
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才会在所运行的下一个GCpass上被删除。
I may simply lack the frame of reference, but over the course of 14 years, I've never once seen an example of a Soft Landing.
可能是我孤陋寡闻,但在过去的14年里面,我没有看到一例软着陆的例子。
These supply theory reference for support design of soft rock roadway, and have important guidance meaning for roadway support technique practice of complex condition.
这些都为软岩巷道的支护工艺过程设计提供了理论参考,同时对于复杂条件下巷道支护的技术实践,具有重要的指导作用。
Soft film ceiling price is composed of the following parts, and reference for decoration company budget.
软膜天花价格由以下几部分构成,供装修公司及预算方参考。
Objective: To study the epidemiology and clinical treatment of neurilemoma and provide the reference data to cure this kind of ordinary soft tissue tumor.
目的:研究神经鞘瘤的流行病学和临床治疗情况,为防治这一临床常见软组织肿瘤提供参考资料。
The results obtained were well reference for further high-speed EFP soft-recovery design and experiments.
所得结果为高速EFP软回收装置的进一步设计和实验提供了参考。
However, a lot of soft clay distribute in paralic shallow shoal, there are few research works of evaluating cyclic capacity of bucket foundation on soft clay to reference until now.
而近海浅滩地区分布着大量的软粘土,如何评价软土地基上桶形基础的循环承载力,尚没有很好的借鉴。
Analysis on causes and disposal methods for jointing disease in soft section of highway with high grade, can provide reference for relative design and construction.
对软土路段高等级拼接路段公路出现的滑坡等病害成因、处治方法进行简单的分析,可为相关专业的设计与施工提供参考。
It provides the reference and advice for all the teachers and educators in colleges &universities to use and manage multimedia soft and hardware resources, according to the different teaching options.
为高校不同专业教师与教育工作者根据不同的教学选择制作和应用多媒体课件以及管理多媒体软硬件资源提供借鉴及建议。
The construction technology and quality control index of core plate strengthening soft soil base is introduced for reference.
详细介绍芯板加固软土地基的施工工艺及质量控制指标,供软基处理施工参考。
The research results can provide a reference for the deformation analysis and stability control of the deep soft rock roadway with high ground pressure.
研究成果可为深部高应力软岩巷道的变形分析与稳定性控制等提供参考。
Based on analyzing conventional SIP soft terminal design and related technologies, this paper brings out the design principle by using the reference of layer design and MVC design pattern.
本文在分析SIP软终端常规设计思路和相关技术的基础上,借鉴分层设计思想和MVC设计模式确定了本软终端的设计思路。
The research result is of certain reference value for engineering of reinforced embankment with soft foundation.
研究结果对软基上路堤加筋处理有借鉴意义。
This paper proposes a novel high precision CMOS bandgap voltage reference which with a soft-start up circuit.
提出了一种新颖的带有软启动的高精密CMOS带隙基准电压源。
Reference segments contained less fibrotic and calcific plaque and proportionately more soft plaque elements.
参考段的病变中纤维斑块及钙化斑块较少而脂质斑块较多。
Palm fiber mattress and soft foam mattresses and other polymeric materials reference to the relevant standards.
棕纤维床垫和软质泡沫聚合材料床垫等要参照相关标准进行。
Palm fiber mattress and soft foam mattresses and other polymeric materials reference to the relevant standards.
棕纤维床垫和软质泡沫聚合材料床垫等要参照相关标准进行。
应用推荐