<?xml version="1.0" encoding="UTF-8"?>











<rss version="2.0" xmlns:jf="http://www.jivesoftware.com/xmlns/jiveforums/rss">



<channel>
    <title>Support Forums: Message List - Learning about soft and weak references in Java 5</title>
    <link>http://www.theserverside.com</link>
    <description>Most recent forum messages</description>
    <language>en</language>
    
        <generator>Jive Forums Silver 5.5.30 (www.jivesoftware.com)</generator>
    
    <pubDate>Sun, 26 May 2013 05:29:35 -0400</pubDate>


    <item>

        <title>soft-reference key or value ?</title>
        <link>http://www.theserverside.com/discussions/thread.tss?thread_id=29865</link>

        

        
            <description><![CDATA[<blockquote>I get your point, i don't get the first point. <br>...<br>iow: what's the advantage (for cache implementation) of implementing the put(k,v) like this&amp;nbsp;&amp;nbsp;&amp;nbsp;return hash.put(key, new SoftValue(value, key, queue));over...]]></description>
        

        <pubDate>Mon, 29 Nov 2004 10:44:34 -0500</pubDate>

        

        <jf:creationDate>Mon, 29 Nov 2004 10:44:34 -0500</jf:creationDate>
        <jf:modificationDate>Mon, 29 Nov 2004 10:44:34 -0500</jf:modificationDate>
        <jf:date>Nov 29, 2004</jf:date>
        <jf:author>James Watson</jf:author>
        <jf:replyCount>0</jf:replyCount>
    </item>


    <item>

        <title>soft-reference key or value ?</title>
        <link>http://www.theserverside.com/discussions/thread.tss?thread_id=29865</link>

        

        
            <description><![CDATA[This is from the article:<br><br>In newsletter 15, I described a SoftReference based HashMap, where the values were embedded in soft references. (The WeakHashMap has the <i>keys</i> embedded in weak references, so that would not be useful for building a...]]></description>
        

        <pubDate>Fri, 26 Nov 2004 07:25:50 -0500</pubDate>

        

        <jf:creationDate>Fri, 26 Nov 2004 07:25:50 -0500</jf:creationDate>
        <jf:modificationDate>Fri, 26 Nov 2004 07:25:50 -0500</jf:modificationDate>
        <jf:date>Nov 26, 2004</jf:date>
        <jf:author>Dieter Cailliau</jf:author>
        <jf:replyCount>1</jf:replyCount>
    </item>


    <item>

        <title>WeakHashMap not usefull for cache?</title>
        <link>http://www.theserverside.com/discussions/thread.tss?thread_id=29865</link>

        

        
            <description><![CDATA[<blockquote>I read in the article:&quot;The WeakHashMap has the keys embedded in weak references, so that would not be useful for building a cache.&quot;In javadoc for WeakHashMap, i read:&quot;When a key has been discarded its entry is effectively...]]></description>
        

        <pubDate>Tue, 23 Nov 2004 12:55:14 -0500</pubDate>

        

        <jf:creationDate>Tue, 23 Nov 2004 12:55:14 -0500</jf:creationDate>
        <jf:modificationDate>Tue, 23 Nov 2004 12:55:14 -0500</jf:modificationDate>
        <jf:date>Nov 23, 2004</jf:date>
        <jf:author>James Watson</jf:author>
        <jf:replyCount>2</jf:replyCount>
    </item>


    <item>

        <title>WeakHashMap not usefull for cache?</title>
        <link>http://www.theserverside.com/discussions/thread.tss?thread_id=29865</link>

        

        
            <description><![CDATA[I read in the article:<br><br>&quot;The WeakHashMap has the keys embedded in weak references, so that would not be useful for building a cache.&quot;<br><br>In javadoc for WeakHashMap, i read:<br><br>&quot;When a key has been discarded its entry is...]]></description>
        

        <pubDate>Mon, 22 Nov 2004 08:33:05 -0500</pubDate>

        

        <jf:creationDate>Mon, 22 Nov 2004 08:33:05 -0500</jf:creationDate>
        <jf:modificationDate>Mon, 22 Nov 2004 08:33:05 -0500</jf:modificationDate>
        <jf:date>Nov 22, 2004</jf:date>
        <jf:author>Dieter Cailliau</jf:author>
        <jf:replyCount>3</jf:replyCount>
    </item>


    <item>

        <title>Learning about soft and weak references in Java 5</title>
        <link>http://www.theserverside.com/discussions/thread.tss?thread_id=29865</link>

        

        
            <description><![CDATA[GhostReference does look like it's dangerously broken with respect to the PhantomReference contract. The standard idiom seems to be to subclass PhantomReference and keep a strong reference to the data required for cleanup. For example, you might have...]]></description>
        

        <pubDate>Fri, 12 Nov 2004 14:03:48 -0500</pubDate>

        

        <jf:creationDate>Fri, 12 Nov 2004 14:03:48 -0500</jf:creationDate>
        <jf:modificationDate>Fri, 12 Nov 2004 14:03:48 -0500</jf:modificationDate>
        <jf:date>Nov 12, 2004</jf:date>
        <jf:author>kschneid</jf:author>
        <jf:replyCount>0</jf:replyCount>
    </item>


    <item>

        <title>Use for Phantom Reference</title>
        <link>http://www.theserverside.com/discussions/thread.tss?thread_id=29865</link>

        

        
            <description><![CDATA[<blockquote>the object has already been finalized</blockquote><br>Maybe that's the key. With WR, I may run into concurrency issues with the finalizer, with PR the finalizer is definetely through.]]></description>
        

        <pubDate>Fri, 12 Nov 2004 06:21:55 -0500</pubDate>

        

        <jf:creationDate>Fri, 12 Nov 2004 06:21:55 -0500</jf:creationDate>
        <jf:modificationDate>Fri, 12 Nov 2004 06:21:55 -0500</jf:modificationDate>
        <jf:date>Nov 12, 2004</jf:date>
        <jf:author>Matthias Ernst</jf:author>
        <jf:replyCount>0</jf:replyCount>
    </item>


    <item>

        <title>Code quality remark</title>
        <link>http://www.theserverside.com/discussions/thread.tss?thread_id=29865</link>

        

        
            <description><![CDATA[Thanks for the article. <br><br>Just make sure you use &quot;Collections.synchronizedSet (new HashSet())&quot; instead of &quot;new HashSet()&quot; in the GhostReference class. ;)<br><br>Vitaliy Shevchuk]]></description>
        

        <pubDate>Fri, 12 Nov 2004 05:21:16 -0500</pubDate>

        

        <jf:creationDate>Fri, 12 Nov 2004 05:21:16 -0500</jf:creationDate>
        <jf:modificationDate>Fri, 12 Nov 2004 05:21:16 -0500</jf:modificationDate>
        <jf:date>Nov 12, 2004</jf:date>
        <jf:author>Vitaly Shevchuc</jf:author>
        <jf:replyCount>0</jf:replyCount>
    </item>


    <item>

        <title>Use for Phantom Reference</title>
        <link>http://www.theserverside.com/discussions/thread.tss?thread_id=29865</link>

        

        
            <description><![CDATA[<blockquote><blockquote>The way you can make use of PhantomReferences is to build a Map associating the references to other Objects.  When the PhantomReference shows up in the queue you use it to look up it's associated Object and do what ever needs to...]]></description>
        

        <pubDate>Thu, 11 Nov 2004 23:18:41 -0500</pubDate>

        

        <jf:creationDate>Thu, 11 Nov 2004 23:18:41 -0500</jf:creationDate>
        <jf:modificationDate>Thu, 11 Nov 2004 23:18:41 -0500</jf:modificationDate>
        <jf:date>Nov 11, 2004</jf:date>
        <jf:author>Clive Brettingham-Moore</jf:author>
        <jf:replyCount>1</jf:replyCount>
    </item>


    <item>

        <title>Use for Phantom Reference</title>
        <link>http://www.theserverside.com/discussions/thread.tss?thread_id=29865</link>

        

        
            <description><![CDATA[<blockquote>The way you can make use of PhantomReferences is to build a Map associating the references to other Objects.  When the PhantomReference shows up in the queue you use it to look up it's associated Object and do what ever needs to be done...I...]]></description>
        

        <pubDate>Thu, 11 Nov 2004 16:16:34 -0500</pubDate>

        

        <jf:creationDate>Thu, 11 Nov 2004 16:16:34 -0500</jf:creationDate>
        <jf:modificationDate>Thu, 11 Nov 2004 16:16:34 -0500</jf:modificationDate>
        <jf:date>Nov 11, 2004</jf:date>
        <jf:author>Matthias Ernst</jf:author>
        <jf:replyCount>2</jf:replyCount>
    </item>


    <item>

        <title>Phantom Refernence clearing</title>
        <link>http://www.theserverside.com/discussions/thread.tss?thread_id=29865</link>

        

        
            <description><![CDATA[<blockquote>However a straight PhantomReference - hmmm.  Dangerous as well - you must remember to let go of your PhantomReference, plus call &quot;clear()&quot; on it, otherwise you develop a memory leak.</blockquote><br>Are you sure about that?  The...]]></description>
        

        <pubDate>Thu, 11 Nov 2004 12:33:28 -0500</pubDate>

        

        <jf:creationDate>Thu, 11 Nov 2004 12:33:28 -0500</jf:creationDate>
        <jf:modificationDate>Thu, 11 Nov 2004 12:33:28 -0500</jf:modificationDate>
        <jf:date>Nov 11, 2004</jf:date>
        <jf:author>James Watson</jf:author>
        <jf:replyCount>0</jf:replyCount>
    </item>


    <item>

        <title>GhostReference</title>
        <link>http://www.theserverside.com/discussions/thread.tss?thread_id=29865</link>

        

        
            <description><![CDATA[The GhostReference class breaks the intent and contract of the PhantomReference.  The reason that the referent is not reachable is (from the API):<br><br>&quot;In order to ensure that a reclaimable object remains so, the referent of a phantom reference...]]></description>
        

        <pubDate>Thu, 11 Nov 2004 11:38:21 -0500</pubDate>

        

        <jf:creationDate>Thu, 11 Nov 2004 11:38:21 -0500</jf:creationDate>
        <jf:modificationDate>Thu, 11 Nov 2004 11:38:21 -0500</jf:modificationDate>
        <jf:date>Nov 11, 2004</jf:date>
        <jf:author>James Watson</jf:author>
        <jf:replyCount>0</jf:replyCount>
    </item>


    <item>

        <title>Use for Phantom Reference</title>
        <link>http://www.theserverside.com/discussions/thread.tss?thread_id=29865</link>

        

        
            <description><![CDATA[The way you can make use of PhantomReferences is to build a Map associating the references to other Objects.  When the PhantomReference shows up in the queue you use it to look up it's associated Object and do what ever needs to be done.  One example...]]></description>
        

        <pubDate>Thu, 11 Nov 2004 11:04:58 -0500</pubDate>

        

        <jf:creationDate>Thu, 11 Nov 2004 11:04:58 -0500</jf:creationDate>
        <jf:modificationDate>Thu, 11 Nov 2004 11:04:58 -0500</jf:modificationDate>
        <jf:date>Nov 11, 2004</jf:date>
        <jf:author>James Watson</jf:author>
        <jf:replyCount>3</jf:replyCount>
    </item>


    <item>

        <title>Am I too stupid?</title>
        <link>http://www.theserverside.com/discussions/thread.tss?thread_id=29865</link>

        

        
            <description><![CDATA[<blockquote><blockquote>As the author notes, it's best to have some tests handy to see if your JVM behaves like you expect.&amp;amp;nbsp;- Don</blockquote><br>Yes, and even then it is rather risky.  It is a pity that the contract for how they are...]]></description>
        

        <pubDate>Thu, 11 Nov 2004 08:20:44 -0500</pubDate>

        

        <jf:creationDate>Thu, 11 Nov 2004 08:20:44 -0500</jf:creationDate>
        <jf:modificationDate>Thu, 11 Nov 2004 08:20:44 -0500</jf:modificationDate>
        <jf:date>Nov 11, 2004</jf:date>
        <jf:author>Cameron Purdy</jf:author>
        <jf:replyCount>0</jf:replyCount>
    </item>


    <item>

        <title>Am I too stupid?</title>
        <link>http://www.theserverside.com/discussions/thread.tss?thread_id=29865</link>

        

        
            <description><![CDATA[<blockquote>As the author notes, it's best to have some tests handy to see if your JVM behaves like you expect.&amp;nbsp;- Don</blockquote><br>Yes, and even then it is rather risky.  It is a pity that the contract for how they are supposed to behave was...]]></description>
        

        <pubDate>Thu, 11 Nov 2004 04:09:44 -0500</pubDate>

        

        <jf:creationDate>Thu, 11 Nov 2004 04:09:44 -0500</jf:creationDate>
        <jf:modificationDate>Thu, 11 Nov 2004 04:09:44 -0500</jf:modificationDate>
        <jf:date>Nov 11, 2004</jf:date>
        <jf:author>Heinz Kabutz</jf:author>
        <jf:replyCount>1</jf:replyCount>
    </item>


    <item>

        <title>Am I too stupid?</title>
        <link>http://www.theserverside.com/discussions/thread.tss?thread_id=29865</link>

        

        
            <description><![CDATA[Yeah, unfortunately my experience to most of these question is &quot;it depends&quot;.  Having worked with many a TopLink cache over the years, it's amazing at how varied behvaviors are with respect to how, when, if Soft and Weak references are handled....]]></description>
        

        <pubDate>Thu, 11 Nov 2004 00:53:12 -0500</pubDate>

        

        <jf:creationDate>Thu, 11 Nov 2004 00:53:12 -0500</jf:creationDate>
        <jf:modificationDate>Thu, 11 Nov 2004 00:53:12 -0500</jf:modificationDate>
        <jf:date>Nov 11, 2004</jf:date>
        <jf:author>Donald Smith</jf:author>
        <jf:replyCount>2</jf:replyCount>
    </item>



</channel>
</rss>

