<?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: Global Variables in iPhone Objective-C</title>
	<atom:link href="http://maniacdev.com/2009/07/global-variables-in-iphone-objective-c/feed/" rel="self" type="application/rss+xml" />
	<link>http://maniacdev.com/2009/07/global-variables-in-iphone-objective-c/</link>
	<description>ManiacDev.Com</description>
	<lastBuildDate>Wed, 08 Feb 2012 08:29:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
	<item>
		<title>By: Nelson Rodrigues</title>
		<link>http://maniacdev.com/2009/07/global-variables-in-iphone-objective-c/comment-page-1/#comment-80367</link>
		<dc:creator>Nelson Rodrigues</dc:creator>
		<pubDate>Thu, 08 Sep 2011 10:49:00 +0000</pubDate>
		<guid isPermaLink="false">http://maniacdev.com/?p=549#comment-80367</guid>
		<description>








Do we need to release the global variables? Thanks!</description>
		<content:encoded><![CDATA[<p>Do we need to release the global variables? Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: maniacdev</title>
		<link>http://maniacdev.com/2009/07/global-variables-in-iphone-objective-c/comment-page-1/#comment-80328</link>
		<dc:creator>maniacdev</dc:creator>
		<pubDate>Sat, 03 Sep 2011 21:48:00 +0000</pubDate>
		<guid isPermaLink="false">http://maniacdev.com/?p=549#comment-80328</guid>
		<description>nope.. it&#039;s a static variable so it will not be allocated and initialized every time you call the method.</description>
		<content:encoded><![CDATA[<p>nope.. it&#8217;s a static variable so it will not be allocated and initialized every time you call the method.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: maniacdev</title>
		<link>http://maniacdev.com/2009/07/global-variables-in-iphone-objective-c/comment-page-1/#comment-80327</link>
		<dc:creator>maniacdev</dc:creator>
		<pubDate>Sat, 03 Sep 2011 21:47:00 +0000</pubDate>
		<guid isPermaLink="false">http://maniacdev.com/?p=549#comment-80327</guid>
		<description>Nope. it will only instantiate if myInstance is nil.</description>
		<content:encoded><![CDATA[<p>Nope. it will only instantiate if myInstance is nil.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Severson</title>
		<link>http://maniacdev.com/2009/07/global-variables-in-iphone-objective-c/comment-page-1/#comment-80326</link>
		<dc:creator>Severson</dc:creator>
		<pubDate>Fri, 02 Sep 2011 23:50:00 +0000</pubDate>
		<guid isPermaLink="false">http://maniacdev.com/?p=549#comment-80326</guid>
		<description>shouldn&#039;t the &quot;static ClassName *myInstance = nil&quot; be outside of the Global method?? Else, you&#039;d have &quot;myInstance&quot; be nil every time you call it, thus always allocating and initializing the class every time you call the method. 

idk, maybe I&#039;m missing something.</description>
		<content:encoded><![CDATA[<p>shouldn&#8217;t the &#8220;static ClassName *myInstance = nil&#8221; be outside of the Global method?? Else, you&#8217;d have &#8220;myInstance&#8221; be nil every time you call it, thus always allocating and initializing the class every time you call the method. </p>
<p>idk, maybe I&#8217;m missing something.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Severson</title>
		<link>http://maniacdev.com/2009/07/global-variables-in-iphone-objective-c/comment-page-1/#comment-80325</link>
		<dc:creator>Severson</dc:creator>
		<pubDate>Fri, 02 Sep 2011 23:43:00 +0000</pubDate>
		<guid isPermaLink="false">http://maniacdev.com/?p=549#comment-80325</guid>
		<description>wait... won&#039;t it re-allocate and re-initiate the class every time you call the &quot;sharedInstance&quot; method, thus giving you a blank slate every time you want to use your variable. yeah I&#039;m confused.</description>
		<content:encoded><![CDATA[<p>wait&#8230; won&#8217;t it re-allocate and re-initiate the class every time you call the &#8220;sharedInstance&#8221; method, thus giving you a blank slate every time you want to use your variable. yeah I&#8217;m confused.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: josevin</title>
		<link>http://maniacdev.com/2009/07/global-variables-in-iphone-objective-c/comment-page-1/#comment-59411</link>
		<dc:creator>josevin</dc:creator>
		<pubDate>Thu, 23 Jun 2011 06:09:10 +0000</pubDate>
		<guid isPermaLink="false">http://maniacdev.com/?p=549#comment-59411</guid>
		<description>thank you....i am searching for this.......</description>
		<content:encoded><![CDATA[<p>thank you&#8230;.i am searching for this&#8230;&#8230;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bjorn</title>
		<link>http://maniacdev.com/2009/07/global-variables-in-iphone-objective-c/comment-page-1/#comment-50274</link>
		<dc:creator>bjorn</dc:creator>
		<pubDate>Tue, 24 May 2011 20:27:05 +0000</pubDate>
		<guid isPermaLink="false">http://maniacdev.com/?p=549#comment-50274</guid>
		<description>In the header you need to add something like:
@propery(nonatomic) variabletype variable;

You also need this is implementation file:
@synthesize variable;

If not, you will get &quot;VariableStore may not respond to variableName&quot;.</description>
		<content:encoded><![CDATA[<p>In the header you need to add something like:<br />
@propery(nonatomic) variabletype variable;</p>
<p>You also need this is implementation file:<br />
@synthesize variable;</p>
<p>If not, you will get &#8220;VariableStore may not respond to variableName&#8221;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kPK</title>
		<link>http://maniacdev.com/2009/07/global-variables-in-iphone-objective-c/comment-page-1/#comment-35193</link>
		<dc:creator>kPK</dc:creator>
		<pubDate>Thu, 14 Apr 2011 07:06:20 +0000</pubDate>
		<guid isPermaLink="false">http://maniacdev.com/?p=549#comment-35193</guid>
		<description>Pretty good stuff ! Works like charm !! 
Thanks</description>
		<content:encoded><![CDATA[<p>Pretty good stuff ! Works like charm !!<br />
Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chu</title>
		<link>http://maniacdev.com/2009/07/global-variables-in-iphone-objective-c/comment-page-1/#comment-4721</link>
		<dc:creator>Chu</dc:creator>
		<pubDate>Mon, 16 Aug 2010 23:15:00 +0000</pubDate>
		<guid isPermaLink="false">http://maniacdev.com/?p=549#comment-4721</guid>
		<description>Hi
Really thanks it works and better than my F...ing global ... Thks a lot</description>
		<content:encoded><![CDATA[<p>Hi<br />
Really thanks it works and better than my F&#8230;ing global &#8230; Thks a lot</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Frank</title>
		<link>http://maniacdev.com/2009/07/global-variables-in-iphone-objective-c/comment-page-1/#comment-2740</link>
		<dc:creator>Frank</dc:creator>
		<pubDate>Wed, 16 Jun 2010 14:52:19 +0000</pubDate>
		<guid isPermaLink="false">http://maniacdev.com/?p=549#comment-2740</guid>
		<description>I make use of 4 global variable parameters. Input once and used throughout three view controllers. Never modified.  I tried to use your singleton and sought advice from Stack Overflow on how best to get four UITextfields (the parameters) into the singleton variables. I came in for some criticism for a) using a singleton for such a piffling requirement and b) for not complying with the Apple recommended Design Pattern for a singleton. Can&#039;t win. Don&#039;t use Globals and don&#039;t use Singletons for program-wide use.

I ended up using 4 Globals and haven&#039;t looked back. So, when is it correct/incorrect to use a singleton?</description>
		<content:encoded><![CDATA[<p>I make use of 4 global variable parameters. Input once and used throughout three view controllers. Never modified.  I tried to use your singleton and sought advice from Stack Overflow on how best to get four UITextfields (the parameters) into the singleton variables. I came in for some criticism for a) using a singleton for such a piffling requirement and b) for not complying with the Apple recommended Design Pattern for a singleton. Can&#8217;t win. Don&#8217;t use Globals and don&#8217;t use Singletons for program-wide use.</p>
<p>I ended up using 4 Globals and haven&#8217;t looked back. So, when is it correct/incorrect to use a singleton?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

