<?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 - Singleton - Static and garbage collection</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>Wed, 19 Jun 2013 11:12:03 -0400</pubDate>


    <item>

        <title>Singleton - Static and garbage collection</title>
        <link>http://www.theserverside.com/discussions/thread.tss?thread_id=28184</link>

        

        
            <description><![CDATA[Indeed an live reference to an object will make it ineligible for GC. The idea of static usage is to allow multiple instances to share the resource, probobly the information stored in this resource/object is not unique per class basis.<br><br>Static...]]></description>
        

        <pubDate>Tue, 07 Sep 2004 09:45:24 -0400</pubDate>

        

        <jf:creationDate>Tue, 07 Sep 2004 09:45:24 -0400</jf:creationDate>
        <jf:modificationDate>Tue, 07 Sep 2004 09:45:24 -0400</jf:modificationDate>
        <jf:date>Sep 7, 2004</jf:date>
        <jf:author>VIJAY KHANNA</jf:author>
        <jf:replyCount>0</jf:replyCount>
    </item>


    <item>

        <title>Singleton - Static and garbage collection</title>
        <link>http://www.theserverside.com/discussions/thread.tss?thread_id=28184</link>

        

        
            <description><![CDATA[As long as you keep a reference to an object, it will not be garbage collected. And the static variable is a reference.<br><br>This also means you can have a sort of memory leaks in Java - if you keep references to objects you don't need. GC can only...]]></description>
        

        <pubDate>Sat, 21 Aug 2004 03:14:59 -0400</pubDate>

        

        <jf:creationDate>Sat, 21 Aug 2004 03:14:59 -0400</jf:creationDate>
        <jf:modificationDate>Sat, 21 Aug 2004 03:14:59 -0400</jf:modificationDate>
        <jf:date>Aug 21, 2004</jf:date>
        <jf:author>Tomas Karlsson</jf:author>
        <jf:replyCount>1</jf:replyCount>
    </item>


    <item>

        <title>Singleton - Static and garbage collection</title>
        <link>http://www.theserverside.com/discussions/thread.tss?thread_id=28184</link>

        

        
            <description><![CDATA[Hi Tomas,<br>Thanks for your response. So you mean if an object of type static it will never be garbage collected??]]></description>
        

        <pubDate>Fri, 20 Aug 2004 09:21:37 -0400</pubDate>

        

        <jf:creationDate>Fri, 20 Aug 2004 09:21:37 -0400</jf:creationDate>
        <jf:modificationDate>Fri, 20 Aug 2004 09:21:37 -0400</jf:modificationDate>
        <jf:date>Aug 20, 2004</jf:date>
        <jf:author>Saravana K Muthuswamy</jf:author>
        <jf:replyCount>2</jf:replyCount>
    </item>


    <item>

        <title>Singleton - Static and garbage collection</title>
        <link>http://www.theserverside.com/discussions/thread.tss?thread_id=28184</link>

        

        
            <description><![CDATA[Hi!<br><br>Since you have a static variable like this:<br><br>private static MySingleton instance = new MySingleton;<br><br>you will always have a reference (in instance) to the object. Therefore, it will never be garbage collected.<br><br>/Tomas]]></description>
        

        <pubDate>Thu, 19 Aug 2004 13:27:38 -0400</pubDate>

        

        <jf:creationDate>Thu, 19 Aug 2004 13:27:38 -0400</jf:creationDate>
        <jf:modificationDate>Thu, 19 Aug 2004 13:27:38 -0400</jf:modificationDate>
        <jf:date>Aug 19, 2004</jf:date>
        <jf:author>Tomas Karlsson</jf:author>
        <jf:replyCount>3</jf:replyCount>
    </item>


    <item>

        <title>Singleton - Static and garbage collection</title>
        <link>http://www.theserverside.com/discussions/thread.tss?thread_id=28184</link>

        

        
            <description><![CDATA[Hi All,<br>Can anyone explain me, <br><br>How the singleton object doesn't get garbage collected or how to make it not collected?<br><br>Is it because a static object, it doesnot get garbage collected??<br><br>Thanks<br>Sara]]></description>
        

        <pubDate>Thu, 19 Aug 2004 10:08:37 -0400</pubDate>

        

        <jf:creationDate>Thu, 19 Aug 2004 10:08:37 -0400</jf:creationDate>
        <jf:modificationDate>Thu, 19 Aug 2004 10:08:37 -0400</jf:modificationDate>
        <jf:date>Aug 19, 2004</jf:date>
        <jf:author>Saravana K Muthuswamy</jf:author>
        <jf:replyCount>4</jf:replyCount>
    </item>



</channel>
</rss>

