<?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: Using malloc to Debug Memory Misuse in Cocoa</title>
	<atom:link href="http://www.friday.com/bbum/2010/01/10/using-malloc-to-debug-memory-misuse-in-cocoa/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.friday.com/bbum/2010/01/10/using-malloc-to-debug-memory-misuse-in-cocoa/</link>
	<description>...so google can index my head.</description>
	<lastBuildDate>Wed, 08 Feb 2012 15:29:18 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: harry.ee</title>
		<link>http://www.friday.com/bbum/2010/01/10/using-malloc-to-debug-memory-misuse-in-cocoa/comment-page-1/#comment-199489</link>
		<dc:creator>harry.ee</dc:creator>
		<pubDate>Tue, 27 Dec 2011 10:13:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.friday.com/bbum/?p=1703#comment-199489</guid>
		<description>Hi Bill, thanks for your blog.
It helped me find incompatible designs between Garbage Collector Apps and NSInvocation (while using DO).
I have random crashes when I call methods which return objects by reference.
If you have any work around, any help will be appreciated.</description>
		<content:encoded><![CDATA[<p>Hi Bill, thanks for your blog.<br />
It helped me find incompatible designs between Garbage Collector Apps and NSInvocation (while using DO).<br />
I have random crashes when I call methods which return objects by reference.<br />
If you have any work around, any help will be appreciated.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: malloc Debugging : Light Year Blog</title>
		<link>http://www.friday.com/bbum/2010/01/10/using-malloc-to-debug-memory-misuse-in-cocoa/comment-page-1/#comment-192778</link>
		<dc:creator>malloc Debugging : Light Year Blog</dc:creator>
		<pubDate>Tue, 12 Jan 2010 21:39:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.friday.com/bbum/?p=1703#comment-192778</guid>
		<description>[...] Debugging Tuesday, January 12, 2010 Bill Bumgarner posted a nice tutorial on using malloc to debug memory misuse in Cocoa. I&#8217;ve run across these before when reading the malloc(1) man page, but it&#8217;s nice to [...]</description>
		<content:encoded><![CDATA[<p>[...] Debugging Tuesday, January 12, 2010 Bill Bumgarner posted a nice tutorial on using malloc to debug memory misuse in Cocoa. I&#8217;ve run across these before when reading the malloc(1) man page, but it&#8217;s nice to [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sean M</title>
		<link>http://www.friday.com/bbum/2010/01/10/using-malloc-to-debug-memory-misuse-in-cocoa/comment-page-1/#comment-192765</link>
		<dc:creator>Sean M</dc:creator>
		<pubDate>Mon, 11 Jan 2010 18:36:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.friday.com/bbum/?p=1703#comment-192765</guid>
		<description>Bill, perhaps you&#039;d have a definitive answer to this: is MallocPreScribble real? This page http://developer.apple.com/mac/library/releasenotes/DeveloperTools/RN-MallocOptions/index.html lists it as a newer feature, but the malloc man page does not mention it.  IIRC, it was discussed on an apple list and the conclusion was that MallocPreScribble is bogus and that MallocScribble scribbles with new allocations and when deallocated.</description>
		<content:encoded><![CDATA[<p>Bill, perhaps you&#8217;d have a definitive answer to this: is MallocPreScribble real? This page <a href="http://developer.apple.com/mac/library/releasenotes/DeveloperTools/RN-MallocOptions/index.html" >http://developer.apple.com/mac/library/releasenotes/DeveloperTools/RN-MallocOptions/index.html</a> lists it as a newer feature, but the malloc man page does not mention it.  IIRC, it was discussed on an apple list and the conclusion was that MallocPreScribble is bogus and that MallocScribble scribbles with new allocations and when deallocated.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: M. Noel</title>
		<link>http://www.friday.com/bbum/2010/01/10/using-malloc-to-debug-memory-misuse-in-cocoa/comment-page-1/#comment-192762</link>
		<dc:creator>M. Noel</dc:creator>
		<pubDate>Mon, 11 Jan 2010 05:07:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.friday.com/bbum/?p=1703#comment-192762</guid>
		<description>Thanks for the very helpful information. In particular, zombies have been a lifesaver for me, especially in the past year.

Whenever I&#039;ve used the leaks tool in the past, legitimate leaks in my own code have been buried beneath objects and strings in Apple frameworks (which I assume are false positives and not actual leaks). It sounds like the tool&#039;s been beefed up, and I&#039;ll have to give it another shot.

I love the retain/release history for zombies in Instruments in 10.6, but it&#039;d be nice to have a way to log retain/release information for my objects during my automated tests. In fact, I&#039;d just settle for a deterministic way to automatically detect Cocoa leaks. Overriding operator new in C++ and using my own CFAllocator for CFTypeRefs has been helpful, but I haven&#039;t been able to come up with a surefire way to get that information for Cocoa objects the framework allocates on my behalf (like copied strings). Swizzling alloc/dealloc/retain/release/copy doesn&#039;t seem like it would work out very well, especially for class clusters, since unlike C++ operator new they&#039;re not actually guaranteed to allocate or deallocate, or even change a ref count. Any ideas? For example, is NSRecordAllocationEvent (from NSDebug.h) useful to third parties, and if so, are there any examples for how we&#039;d use it? Anyhow, if you have any suggestions for how we should automate detecting Cocoa leaks, I&#039;d love to hear it.</description>
		<content:encoded><![CDATA[<p>Thanks for the very helpful information. In particular, zombies have been a lifesaver for me, especially in the past year.</p>
<p>Whenever I&#8217;ve used the leaks tool in the past, legitimate leaks in my own code have been buried beneath objects and strings in Apple frameworks (which I assume are false positives and not actual leaks). It sounds like the tool&#8217;s been beefed up, and I&#8217;ll have to give it another shot.</p>
<p>I love the retain/release history for zombies in Instruments in 10.6, but it&#8217;d be nice to have a way to log retain/release information for my objects during my automated tests. In fact, I&#8217;d just settle for a deterministic way to automatically detect Cocoa leaks. Overriding operator new in C++ and using my own CFAllocator for CFTypeRefs has been helpful, but I haven&#8217;t been able to come up with a surefire way to get that information for Cocoa objects the framework allocates on my behalf (like copied strings). Swizzling alloc/dealloc/retain/release/copy doesn&#8217;t seem like it would work out very well, especially for class clusters, since unlike C++ operator new they&#8217;re not actually guaranteed to allocate or deallocate, or even change a ref count. Any ideas? For example, is NSRecordAllocationEvent (from NSDebug.h) useful to third parties, and if so, are there any examples for how we&#8217;d use it? Anyhow, if you have any suggestions for how we should automate detecting Cocoa leaks, I&#8217;d love to hear it.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

