<?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: Singleton Classes</title>
	<atom:link href="http://iphone.galloway.me.uk/iphone-sdktutorials/singleton-classes/feed/" rel="self" type="application/rss+xml" />
	<link>http://iphone.galloway.me.uk</link>
	<description>iPhone Applications</description>
	<lastBuildDate>Wed, 01 Sep 2010 11:59:39 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Matt Galloway</title>
		<link>http://iphone.galloway.me.uk/iphone-sdktutorials/singleton-classes/comment-page-2/#comment-1942</link>
		<dc:creator>Matt Galloway</dc:creator>
		<pubDate>Wed, 01 Sep 2010 11:57:21 +0000</pubDate>
		<guid isPermaLink="false">http://iphone.galloway.me.uk/?page_id=137#comment-1942</guid>
		<description>@pawi - that code itself shouldn&#039;t leak. Is your property retained or copied? Either way it should still be fine though. You might need to show me more context in order for me to help on this one.</description>
		<content:encoded><![CDATA[<p>@pawi &#8211; that code itself shouldn&#8217;t leak. Is your property retained or copied? Either way it should still be fine though. You might need to show me more context in order for me to help on this one.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matt Galloway</title>
		<link>http://iphone.galloway.me.uk/iphone-sdktutorials/singleton-classes/comment-page-2/#comment-1941</link>
		<dc:creator>Matt Galloway</dc:creator>
		<pubDate>Wed, 01 Sep 2010 11:54:50 +0000</pubDate>
		<guid isPermaLink="false">http://iphone.galloway.me.uk/?page_id=137#comment-1941</guid>
		<description>@jadodgers - you&#039;d use the same one for multiple variables, just have an instance variable of the singleton for each variable you want. Does that make sense?</description>
		<content:encoded><![CDATA[<p>@jadodgers &#8211; you&#8217;d use the same one for multiple variables, just have an instance variable of the singleton for each variable you want. Does that make sense?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jsdodgers</title>
		<link>http://iphone.galloway.me.uk/iphone-sdktutorials/singleton-classes/comment-page-2/#comment-1934</link>
		<dc:creator>Jsdodgers</dc:creator>
		<pubDate>Tue, 31 Aug 2010 19:48:54 +0000</pubDate>
		<guid isPermaLink="false">http://iphone.galloway.me.uk/?page_id=137#comment-1934</guid>
		<description>I am new to Singletons, and I do not quite know how they work. Do you have to have a separate Singleton for every variable that you want to store or can you use the same one for multiple variables. If so, how exactly would this work?</description>
		<content:encoded><![CDATA[<p>I am new to Singletons, and I do not quite know how they work. Do you have to have a separate Singleton for every variable that you want to store or can you use the same one for multiple variables. If so, how exactly would this work?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pawi</title>
		<link>http://iphone.galloway.me.uk/iphone-sdktutorials/singleton-classes/comment-page-2/#comment-1930</link>
		<dc:creator>pawi</dc:creator>
		<pubDate>Tue, 31 Aug 2010 11:19:01 +0000</pubDate>
		<guid isPermaLink="false">http://iphone.galloway.me.uk/?page_id=137#comment-1930</guid>
		<description>Hi again, 

Instead of posting my whole code, I try to explain what causes my leak: 

Whenever I get the shared instance as described in your post, I want to set a property through 

myManager.someProperty = [NSString stringWithFormat:@&quot;blabla&quot;, someStringValue];

Everytime I set a property this way, it causes an NSString-Object leak... My property is synthesized.

Any Idea?</description>
		<content:encoded><![CDATA[<p>Hi again, </p>
<p>Instead of posting my whole code, I try to explain what causes my leak: </p>
<p>Whenever I get the shared instance as described in your post, I want to set a property through </p>
<p>myManager.someProperty = [NSString stringWithFormat:@"blabla", someStringValue];</p>
<p>Everytime I set a property this way, it causes an NSString-Object leak&#8230; My property is synthesized.</p>
<p>Any Idea?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pawi</title>
		<link>http://iphone.galloway.me.uk/iphone-sdktutorials/singleton-classes/comment-page-2/#comment-1885</link>
		<dc:creator>pawi</dc:creator>
		<pubDate>Fri, 27 Aug 2010 10:43:42 +0000</pubDate>
		<guid isPermaLink="false">http://iphone.galloway.me.uk/?page_id=137#comment-1885</guid>
		<description>Ah Nuuu! To early. Still leaking. Can I send you my code? Would really appreciate your help!</description>
		<content:encoded><![CDATA[<p>Ah Nuuu! To early. Still leaking. Can I send you my code? Would really appreciate your help!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pawi</title>
		<link>http://iphone.galloway.me.uk/iphone-sdktutorials/singleton-classes/comment-page-2/#comment-1883</link>
		<dc:creator>pawi</dc:creator>
		<pubDate>Fri, 27 Aug 2010 09:46:57 +0000</pubDate>
		<guid isPermaLink="false">http://iphone.galloway.me.uk/?page_id=137#comment-1883</guid>
		<description>Hi Matt, thanks for your quick reply. Now that I double-check with instruments, the leak is gone ;-) I guess I has to clean my targets. (btw: the leak was from my old implementation. However, it passed Apple&#039;s approval process...) Cheerz!</description>
		<content:encoded><![CDATA[<p>Hi Matt, thanks for your quick reply. Now that I double-check with instruments, the leak is gone <img src='http://iphone.galloway.me.uk/wordpress/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />  I guess I has to clean my targets. (btw: the leak was from my old implementation. However, it passed Apple&#8217;s approval process&#8230;) Cheerz!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matt Galloway</title>
		<link>http://iphone.galloway.me.uk/iphone-sdktutorials/singleton-classes/comment-page-2/#comment-1882</link>
		<dc:creator>Matt Galloway</dc:creator>
		<pubDate>Fri, 27 Aug 2010 09:29:11 +0000</pubDate>
		<guid isPermaLink="false">http://iphone.galloway.me.uk/?page_id=137#comment-1882</guid>
		<description>@pawi - You probably have a bug in the code somewhere. The singleton shouldn&#039;t show as being leaked. What is the actual object that is being leaked?</description>
		<content:encoded><![CDATA[<p>@pawi &#8211; You probably have a bug in the code somewhere. The singleton shouldn&#8217;t show as being leaked. What is the actual object that is being leaked?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pawi</title>
		<link>http://iphone.galloway.me.uk/iphone-sdktutorials/singleton-classes/comment-page-2/#comment-1881</link>
		<dc:creator>pawi</dc:creator>
		<pubDate>Fri, 27 Aug 2010 09:24:57 +0000</pubDate>
		<guid isPermaLink="false">http://iphone.galloway.me.uk/?page_id=137#comment-1881</guid>
		<description>Thanks for that post. Just one question: Running the code in Instruments still shows a &#039;leak&#039; for that class. Is this correct, resp. is that the one instance that is never released? Or am I having a bug in the code?</description>
		<content:encoded><![CDATA[<p>Thanks for that post. Just one question: Running the code in Instruments still shows a &#8216;leak&#8217; for that class. Is this correct, resp. is that the one instance that is never released? Or am I having a bug in the code?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bob Chepperson</title>
		<link>http://iphone.galloway.me.uk/iphone-sdktutorials/singleton-classes/comment-page-2/#comment-1806</link>
		<dc:creator>Bob Chepperson</dc:creator>
		<pubDate>Fri, 20 Aug 2010 04:04:05 +0000</pubDate>
		<guid isPermaLink="false">http://iphone.galloway.me.uk/?page_id=137#comment-1806</guid>
		<description>That makes sense, thanks for the explanation.</description>
		<content:encoded><![CDATA[<p>That makes sense, thanks for the explanation.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matt Galloway</title>
		<link>http://iphone.galloway.me.uk/iphone-sdktutorials/singleton-classes/comment-page-2/#comment-1790</link>
		<dc:creator>Matt Galloway</dc:creator>
		<pubDate>Thu, 19 Aug 2010 08:11:30 +0000</pubDate>
		<guid isPermaLink="false">http://iphone.galloway.me.uk/?page_id=137#comment-1790</guid>
		<description>@Bob - Short answer, no. The idea of a singleton is to model 1 object which inherently has a lifetime the same length as your application. Just like you have 1 and only 1 instance that conforms to the UIApplicationDelegate protocol. It doesn&#039;t matter that you never release the object, because you&#039;re not ever going to want to do that if the lifetime is the same as your application.

Does that help?</description>
		<content:encoded><![CDATA[<p>@Bob &#8211; Short answer, no. The idea of a singleton is to model 1 object which inherently has a lifetime the same length as your application. Just like you have 1 and only 1 instance that conforms to the UIApplicationDelegate protocol. It doesn&#8217;t matter that you never release the object, because you&#8217;re not ever going to want to do that if the lifetime is the same as your application.</p>
<p>Does that help?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
