<?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"
	>
<channel>
	<title>Comments on: The Singleton</title>
	<atom:link href="http://www.wazooinc.com/2008/01/31/the-singleton/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.wazooinc.com/2008/01/31/the-singleton/</link>
	<description>Having fun in game development!</description>
	<pubDate>Fri, 25 Jul 2008 08:16:52 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6</generator>
		<item>
		<title>By: wazoo</title>
		<link>http://www.wazooinc.com/2008/01/31/the-singleton/#comment-1205</link>
		<dc:creator>wazoo</dc:creator>
		<pubDate>Thu, 05 Jun 2008 14:59:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.wazooinc.com/2008/01/31/the-singleton/#comment-1205</guid>
		<description>Thanks for that suggestion Alejandro and glad you like the site!

That might be a better way to do this...I know that I don't like launching a game only to see a nasty assertion error dialog pop out at me.

My only reasoning behind doing the assert approach is that you could somehow (in the future) use this as a way to trap the problem and create a more helpful way to diagnose / troubleshoot the error.

For example, when you see those stack error dialogs come up in World of Warcraft. It gives you the option of submitting the problem / register output to Blizzard for aiding them.</description>
		<content:encoded><![CDATA[<p>Thanks for that suggestion Alejandro and glad you like the site!</p>
<p>That might be a better way to do this&#8230;I know that I don&#8217;t like launching a game only to see a nasty assertion error dialog pop out at me.</p>
<p>My only reasoning behind doing the assert approach is that you could somehow (in the future) use this as a way to trap the problem and create a more helpful way to diagnose / troubleshoot the error.</p>
<p>For example, when you see those stack error dialogs come up in World of Warcraft. It gives you the option of submitting the problem / register output to Blizzard for aiding them.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alejandro Segovia</title>
		<link>http://www.wazooinc.com/2008/01/31/the-singleton/#comment-1183</link>
		<dc:creator>Alejandro Segovia</dc:creator>
		<pubDate>Wed, 28 May 2008 14:46:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.wazooinc.com/2008/01/31/the-singleton/#comment-1183</guid>
		<description>Instead of using asserts to make sure no one calls the constructor more than once, you could make the singleton's constructor protected and provide an static getInstance() method which creates or returns the singleton object as needed.

The main advantage of using this approach instead of using assertions is that attempts to create the singleton object will be catched by the compiler, whereas using assertions will probably abort the application if the programmer wasn't careful.

Great site, btw!

Cheers,
Alejandro.-</description>
		<content:encoded><![CDATA[<p>Instead of using asserts to make sure no one calls the constructor more than once, you could make the singleton&#8217;s constructor protected and provide an static getInstance() method which creates or returns the singleton object as needed.</p>
<p>The main advantage of using this approach instead of using assertions is that attempts to create the singleton object will be catched by the compiler, whereas using assertions will probably abort the application if the programmer wasn&#8217;t careful.</p>
<p>Great site, btw!</p>
<p>Cheers,<br />
Alejandro.-</p>
]]></content:encoded>
	</item>
</channel>
</rss>
