<?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: malloc: ***  Deallocation of a pointer not malloced: 0&#215;500120; This could be a double free(), or free() called with the middle of an allocated block; Try setting environment variable MallocHelp to see tools to help debug</title>
	<atom:link href="http://www.boyfarrell.com/learning-curve/malloc-deallocation-of-a-pointer-not-malloced-0x500120-this-could-be-a-double-free-or-free-called-with-the-middle-of-an-allocated-block-try-setting-environment-variable-mallochelp-to-see-tools-to-help/feed" rel="self" type="application/rss+xml" />
	<link>http://www.boyfarrell.com/learning-curve/malloc-deallocation-of-a-pointer-not-malloced-0x500120-this-could-be-a-double-free-or-free-called-with-the-middle-of-an-allocated-block-try-setting-environment-variable-mallochelp-to-see-tools-to-help</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Fri, 07 May 2010 16:09:36 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: Chinmoy</title>
		<link>http://www.boyfarrell.com/learning-curve/malloc-deallocation-of-a-pointer-not-malloced-0x500120-this-could-be-a-double-free-or-free-called-with-the-middle-of-an-allocated-block-try-setting-environment-variable-mallochelp-to-see-tools-to-help/comment-page-1#comment-100</link>
		<dc:creator>Chinmoy</dc:creator>
		<pubDate>Wed, 30 May 2007 14:16:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.boyfarrell.com/learning-curve/malloc-deallocation-of-a-pointer-not-malloced-0x500120-this-could-be-a-double-free-or-free-called-with-the-middle-of-an-allocated-block-try-setting-environment-variable-mallochelp-to-see-tools-to-help#comment-100</guid>
		<description>Actually, I can&#039;t take credit for setting the pointer to nil, because I read that in Aaron Hillegass&#039;s book, Cocoa Programming for Mac OS X :)

Chinmoy.</description>
		<content:encoded><![CDATA[<p>Actually, I can&#8217;t take credit for setting the pointer to nil, because I read that in Aaron Hillegass&#8217;s book, Cocoa Programming for Mac OS X <img src='http://www.boyfarrell.com/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Chinmoy.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: boyfarrell</title>
		<link>http://www.boyfarrell.com/learning-curve/malloc-deallocation-of-a-pointer-not-malloced-0x500120-this-could-be-a-double-free-or-free-called-with-the-middle-of-an-allocated-block-try-setting-environment-variable-mallochelp-to-see-tools-to-help/comment-page-1#comment-99</link>
		<dc:creator>boyfarrell</dc:creator>
		<pubDate>Sat, 26 May 2007 20:43:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.boyfarrell.com/learning-curve/malloc-deallocation-of-a-pointer-not-malloced-0x500120-this-could-be-a-double-free-or-free-called-with-the-middle-of-an-allocated-block-try-setting-environment-variable-mallochelp-to-see-tools-to-help#comment-99</guid>
		<description>Hi,

It never occurred to me to set the method to nil. That could be a good problem solving method. Cheers for the link.

Dan.</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>It never occurred to me to set the method to nil. That could be a good problem solving method. Cheers for the link.</p>
<p>Dan.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chinmoy</title>
		<link>http://www.boyfarrell.com/learning-curve/malloc-deallocation-of-a-pointer-not-malloced-0x500120-this-could-be-a-double-free-or-free-called-with-the-middle-of-an-allocated-block-try-setting-environment-variable-mallochelp-to-see-tools-to-help/comment-page-1#comment-98</link>
		<dc:creator>Chinmoy</dc:creator>
		<pubDate>Fri, 25 May 2007 22:11:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.boyfarrell.com/learning-curve/malloc-deallocation-of-a-pointer-not-malloced-0x500120-this-could-be-a-double-free-or-free-called-with-the-middle-of-an-allocated-block-try-setting-environment-variable-mallochelp-to-see-tools-to-help#comment-98</guid>
		<description>Hi Daniel,

You could  use MallocDebug (see http://developer.apple.com/tools/performance/overview.html#mallocdebug) to find memory allocation related problems. MallocDebug is a standalone app that comes with the CHUD(Computer Hardware Understanding Development Tools) that you can download from Apple&#039;s Developer Connection.

You could also add this trick after a call to release:

[object release]; //this is your first release
object = nil;

[object release]; //same as [nil release];
                          //nothing happens. 
                         //actually &lt;i&gt;something&lt;/i&gt; might happen, but             
                        //not another release.</description>
		<content:encoded><![CDATA[<p>Hi Daniel,</p>
<p>You could  use MallocDebug (see <a href="http://developer.apple.com/tools/performance/overview.html#mallocdebug)" rel="nofollow">http://developer.apple.com/tools/performance/overview.html#mallocdebug)</a> to find memory allocation related problems. MallocDebug is a standalone app that comes with the CHUD(Computer Hardware Understanding Development Tools) that you can download from Apple&#8217;s Developer Connection.</p>
<p>You could also add this trick after a call to release:</p>
<p>[object release]; //this is your first release<br />
object = nil;</p>
<p>[object release]; //same as [nil release];<br />
                          //nothing happens.<br />
                         //actually <i>something</i> might happen, but<br />
                        //not another release.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
