<?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: AS3 Singleton Pattern Implementation</title>
	<atom:link href="http://www.ericfeminella.com/blog/2006/09/16/as3-true-singleton-implementation/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ericfeminella.com/blog/2006/09/16/as3-true-singleton-implementation/</link>
	<description>Thoughts on Software Design and Development</description>
	<lastBuildDate>Sun, 08 Jan 2012 14:25:56 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: eric</title>
		<link>http://www.ericfeminella.com/blog/2006/09/16/as3-true-singleton-implementation/comment-page-1/#comment-3464</link>
		<dc:creator>eric</dc:creator>
		<pubDate>Tue, 07 Aug 2007 15:09:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.ericfeminella.com/blog/2006/09/16/as3-true-singleton-implementation/#comment-3464</guid>
		<description>Hey Polesen,

You have a nice solutions as well, however I prefer to have an inner class which sole purpose is to restrict constructor access to private as I find this method to be an elegant solution as it allows an abstraction of singleton creation from Singleton implementation.

A Singleton class in my opinion should not contain any members (static or instance) which are responsible for creating the singleton object other than the static instance member.</description>
		<content:encoded><![CDATA[<p>Hey Polesen,</p>
<p>You have a nice solutions as well, however I prefer to have an inner class which sole purpose is to restrict constructor access to private as I find this method to be an elegant solution as it allows an abstraction of singleton creation from Singleton implementation.</p>
<p>A Singleton class in my opinion should not contain any members (static or instance) which are responsible for creating the singleton object other than the static instance member.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: polesen</title>
		<link>http://www.ericfeminella.com/blog/2006/09/16/as3-true-singleton-implementation/comment-page-1/#comment-3463</link>
		<dc:creator>polesen</dc:creator>
		<pubDate>Mon, 06 Aug 2007 19:11:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.ericfeminella.com/blog/2006/09/16/as3-true-singleton-implementation/#comment-3463</guid>
		<description>Hi Eric,

Great post you have got there. Thank you! I am learning flex and actionscript3 currently, and I was a bit surprised to know, I could not mark constructors as private.

There is another option though, that avoids the need to create an extra internal class. You can simply put a static boolean flag inside the singleton, and let the constructor fail, if the flag is false. The static getInstance() method can then set and reset this flag on instance creation.

I have shown how here, in my post on &lt;a href=&quot;http://techpolesen.blogspot.com/2007/07/actionscript3-singletons.html&quot; rel=&quot;nofollow&quot;&gt;ActionScript3 Singleton&lt;/a&gt;.</description>
		<content:encoded><![CDATA[<p>Hi Eric,</p>
<p>Great post you have got there. Thank you! I am learning flex and actionscript3 currently, and I was a bit surprised to know, I could not mark constructors as private.</p>
<p>There is another option though, that avoids the need to create an extra internal class. You can simply put a static boolean flag inside the singleton, and let the constructor fail, if the flag is false. The static getInstance() method can then set and reset this flag on instance creation.</p>
<p>I have shown how here, in my post on <a href="http://techpolesen.blogspot.com/2007/07/actionscript3-singletons.html" rel="nofollow">ActionScript3 Singleton</a>.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

