Soft reference

Soft reference

A soft reference is one of the strengths or levels of 'non strong' reference defined in the Java programming language, the others being weak and phantom.

The garbage collector will always collect weakly referenced objects, but will only collect softly referenced objects when its algorithms decide that memory is low enough to warrant it. Soft and weak references provide two quasi-priorities for non-strongly referenced objects.

Soft references may be used, for example, when writing a cache: weakly referenced objects may disappear too quickly to make the cache useful.

External links

* [http://www.pawlan.com/Monica/refobjs/ Java developer article: 'Reference Objects and Garbage Collection']
* [http://weblogs.java.net/blog/enicholas/archive/2006/05/understanding_w.html Understanding Weak References]
* [http://rcache.sourceforge.net/ RCache - Java Library for weak/soft reference based cache]


Wikimedia Foundation. 2010.

Игры ⚽ Нужен реферат?

Look at other dictionaries:

  • Soft drink naming conventions — Soft drinks are called by many names in different places of the world. Africa Ethiopia Soft drinks are generally known in Ethiopia by the Amharic word leslassa , meaning literally smooth . The popular brand names Koka (Coke) and Mirinda (Orange… …   Wikipedia

  • Soft-furred Rat — Conservation status Least Concern (IUCN 2.3) Scientific classification Kingdo …   Wikipedia

  • soft — adj Soft, bland, mild, gentle, smooth, lenient, balmy are applied to things with respect to the sensations they evoke or the impressions they produce and mean pleasantly agreeable because devoid of all harshness or roughness. Soft is applied… …   New Dictionary of Synonyms

  • Soft Matter —   Titre abrégé Soft Matter Discipline Chimie Langue …   Wikipédia en Français

  • Soft soap — can refer to one of the following: * a general purpose soap that is liquid or easily soluble, as opposed to a hard soap which will only dissolve sparingly. * a hygiene product made exclusively from natural oils. In this case soft prefix is a… …   Wikipedia

  • Soft Target (book) — Infobox Book name = Soft Target: How the Indian Intelligence Service Penetrated Canada title orig = image caption = Cover page. author = Zuhair Kashmeri Brian McAndrew cover artist = country = Canada language = English series = subject = genre =… …   Wikipedia

  • Soft law — Droit mou Le droit mou (soft law en anglais) est un ensemble de règles dont la « juridicité » est discutée. Ce sont des règles de droit non obligatoires, ce qui est a priori contraire à l essence du droit. On trouve du droit mou en… …   Wikipédia en Français

  • Soft error — In electronics and computing, an error is a signal or datum which is wrong. Errors may be caused by a defect, usually understood either to be a mistake in design or construction, or a broken component. A soft error is also a signal or datum which …   Wikipedia

  • Soft law — The term soft law refers to quasi legal instruments which do not have any legally binding force, or whose binding force is somewhat weaker than the binding force of traditionallaw, often contrasted with soft law by being referred to as hard law …   Wikipedia

  • soft drink — a beverage that is not alcoholic or intoxicating and is usually carbonated, as root beer or ginger ale. [1875 80] * * * Nonalcoholic beverage, usually carbonated, consisting of water (soda water), flavouring, and a sweet syrup or artificial… …   Universalium

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”