How to GC a SoftReference if its reference is GC'ed
<p>I have a </p>

<pre><code>ConcurrentMap&lt;String, SoftReference&lt;X&gt;&gt; map = new ConcurrentHashMap&lt;String, SoftReference&lt;X&gt;&gt;();
</code></pre>

<p>and would like the key/value pair removed from the map when the referent of the SoftReference is GC'ed. </p>

<p>How do I go about achieving this?</p>
