<?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: Memory Management and NIBs on the iPhone</title>
	<atom:link href="http://blog.airsource.co.uk/index.php/2008/12/23/memory-management-and-nibs/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.airsource.co.uk/index.php/2008/12/23/memory-management-and-nibs/</link>
	<description>Code and cogitation on all things mobile</description>
	<lastBuildDate>Wed, 01 Feb 2012 08:56:54 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Aman</title>
		<link>http://blog.airsource.co.uk/index.php/2008/12/23/memory-management-and-nibs/comment-page-1/#comment-1390</link>
		<dc:creator>Aman</dc:creator>
		<pubDate>Fri, 19 Feb 2010 11:03:03 +0000</pubDate>
		<guid isPermaLink="false">http://blog.airsource.co.uk/?p=331#comment-1390</guid>
		<description>If you don&#039;t release it on dealloc it will raise the memory footprint. 

See more detail here with instrument ObjectAlloc graph: http://amanpages.com/iphone-app-development-core-sdk-cocoa/iphone-iboutlet-should-be-released-manually/</description>
		<content:encoded><![CDATA[<p>If you don&#8217;t release it on dealloc it will raise the memory footprint. </p>
<p>See more detail here with instrument ObjectAlloc graph: <a href="http://amanpages.com/iphone-app-development-core-sdk-cocoa/iphone-iboutlet-should-be-released-manually/" rel="nofollow">http://amanpages.com/iphone-app-development-core-sdk-cocoa/iphone-iboutlet-should-be-released-manually/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John</title>
		<link>http://blog.airsource.co.uk/index.php/2008/12/23/memory-management-and-nibs/comment-page-1/#comment-231</link>
		<dc:creator>John</dc:creator>
		<pubDate>Thu, 29 Jan 2009 17:17:23 +0000</pubDate>
		<guid isPermaLink="false">http://blog.airsource.co.uk/?p=331#comment-231</guid>
		<description>On the point about using assign on an IBOutlet property: not sure this is such a good idea. If you don&#039;t retain your IBOutlet it&#039;s quite possible to have bits and pieces failing to remain loaded after you load from the NIB, if they&#039;re not immediately pushed onto a view or controller somewhere that will retain them. The expectation of a user of a class using the interface builder is that something attached to an IBOutlet &lt;strong&gt;will&lt;/strong&gt; get retained.

On the point about dealloc methods. The &#039;.&#039; accessor syntax is confusing for anyone who&#039;s not too familiar with Objective C, and there are situations in which setX accessors with side-effects are useful such as in a utility class. Moreover, setX accessors can be overridden by subclasses, which is a good reason why calling them from dealloc probably isn&#039;t such a good idea, since the subclass will already have dealloc&#039;d.</description>
		<content:encoded><![CDATA[<p>On the point about using assign on an IBOutlet property: not sure this is such a good idea. If you don&#8217;t retain your IBOutlet it&#8217;s quite possible to have bits and pieces failing to remain loaded after you load from the NIB, if they&#8217;re not immediately pushed onto a view or controller somewhere that will retain them. The expectation of a user of a class using the interface builder is that something attached to an IBOutlet <strong>will</strong> get retained.</p>
<p>On the point about dealloc methods. The &#8216;.&#8217; accessor syntax is confusing for anyone who&#8217;s not too familiar with Objective C, and there are situations in which setX accessors with side-effects are useful such as in a utility class. Moreover, setX accessors can be overridden by subclasses, which is a good reason why calling them from dealloc probably isn&#8217;t such a good idea, since the subclass will already have dealloc&#8217;d.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ben</title>
		<link>http://blog.airsource.co.uk/index.php/2008/12/23/memory-management-and-nibs/comment-page-1/#comment-212</link>
		<dc:creator>Ben</dc:creator>
		<pubDate>Wed, 21 Jan 2009 21:12:40 +0000</pubDate>
		<guid isPermaLink="false">http://blog.airsource.co.uk/?p=331#comment-212</guid>
		<description>I read the article you reference, but I&#039;m missing the point. 

a) I was suggesting that accessors were useful because if you swap from assign to retain properties or vice versa, everything still works
b) I see no immediate reason not to use accessor methods for properties in dealloc. Obviously they should not be used after calling [super dealloc] - but that should be the last thing you do anyway. Obviously you should also be aware of side-effects - but it is the side effect of the implicit release call that I specifically want here! You may argue that the order in which the accessors are called matters, or that they have other side effects that cannot be easily handled - I would argue that is a deficiency in the design and makes the code brittle in its own right  - and should be fixed, rather than working around it.
c) The article you reference indicates that UIViewController itself calls an accessor method in dealloc - the specific construct you are saying is bad.
d) How do you have a declared property without having an accessor? I admit it will compile, but you will get a warning.</description>
		<content:encoded><![CDATA[<p>I read the article you reference, but I&#8217;m missing the point. </p>
<p>a) I was suggesting that accessors were useful because if you swap from assign to retain properties or vice versa, everything still works<br />
b) I see no immediate reason not to use accessor methods for properties in dealloc. Obviously they should not be used after calling [super dealloc] &#8211; but that should be the last thing you do anyway. Obviously you should also be aware of side-effects &#8211; but it is the side effect of the implicit release call that I specifically want here! You may argue that the order in which the accessors are called matters, or that they have other side effects that cannot be easily handled &#8211; I would argue that is a deficiency in the design and makes the code brittle in its own right  &#8211; and should be fixed, rather than working around it.<br />
c) The article you reference indicates that UIViewController itself calls an accessor method in dealloc &#8211; the specific construct you are saying is bad.<br />
d) How do you have a declared property without having an accessor? I admit it will compile, but you will get a warning.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mmalc</title>
		<link>http://blog.airsource.co.uk/index.php/2008/12/23/memory-management-and-nibs/comment-page-1/#comment-210</link>
		<dc:creator>mmalc</dc:creator>
		<pubDate>Wed, 21 Jan 2009 03:04:09 +0000</pubDate>
		<guid isPermaLink="false">http://blog.airsource.co.uk/?p=331#comment-210</guid>
		<description>This is dreadfully confused, and conflates the syntactic sugar of declared properties with the presence or absence of accessor methods.
Moreover, you should *not* use accessor methods in dealloc.
For a more detailed discussion, see http://stackoverflow.com/questions/61838</description>
		<content:encoded><![CDATA[<p>This is dreadfully confused, and conflates the syntactic sugar of declared properties with the presence or absence of accessor methods.<br />
Moreover, you should *not* use accessor methods in dealloc.<br />
For a more detailed discussion, see <a href="http://stackoverflow.com/questions/61838" rel="nofollow">http://stackoverflow.com/questions/61838</a></p>
]]></content:encoded>
	</item>
</channel>
</rss>

