<?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: iPhone &#8211; Downloading an image asynchronously. Revisited!</title>
	<atom:link href="http://blog.sallarp.com/asynch-uiimage-revisited/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.sallarp.com/asynch-uiimage-revisited/</link>
	<description>Code, Code, Revolution!</description>
	<lastBuildDate>Fri, 03 Sep 2010 14:40:44 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: eBuildy</title>
		<link>http://blog.sallarp.com/asynch-uiimage-revisited/comment-page-1/#comment-13039</link>
		<dc:creator>eBuildy</dc:creator>
		<pubDate>Wed, 25 Aug 2010 12:15:37 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sallarp.com/?p=108#comment-13039</guid>
		<description>You can also use the magic TTImageView component from the Three20 library (the iOS framework built by the Facebook team)...</description>
		<content:encoded><![CDATA[<p>You can also use the magic TTImageView component from the Three20 library (the iOS framework built by the Facebook team)&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Richard Fliam</title>
		<link>http://blog.sallarp.com/asynch-uiimage-revisited/comment-page-1/#comment-11676</link>
		<dc:creator>Richard Fliam</dc:creator>
		<pubDate>Mon, 21 Jun 2010 05:11:08 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sallarp.com/?p=108#comment-11676</guid>
		<description>Old post to comment on but the leak occurs when the image reaches a retain count of zero and dealloc is called... before abortDownload or connectionDidFinishLoading: is called. This causes a general leak of downLoadedImage and m_requestData. Adding [self abortDownload]; to the dealloc method should fix this.</description>
		<content:encoded><![CDATA[<p>Old post to comment on but the leak occurs when the image reaches a retain count of zero and dealloc is called&#8230; before abortDownload or connectionDidFinishLoading: is called. This causes a general leak of downLoadedImage and m_requestData. Adding [self abortDownload]; to the dealloc method should fix this.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: coder</title>
		<link>http://blog.sallarp.com/asynch-uiimage-revisited/comment-page-1/#comment-10852</link>
		<dc:creator>coder</dc:creator>
		<pubDate>Wed, 19 May 2010 09:23:11 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sallarp.com/?p=108#comment-10852</guid>
		<description>yes there is memory leak about InternetImage.
i just put a UIbutton in view. 
i pasted your code buttons event:
[self downloadImageFromInternet:@&quot;http://www.google.se/intl/en_com/images/logo_plain.png&quot;];
there is no memory leak when you first tap the button.
but when you tap again
there are memory leaks:
InternetImage
UIImage

i also changed your connection code:

	NSURL *url = [NSURL URLWithString:ImageUrl];
	NSURLRequest *imageRequest = [[NSURLRequest alloc] initWithURL: url];
	imageConnection = [[[NSURLConnection alloc] initWithRequest:imageRequest delegate:self] autorelease];

how can i solve it? i want to refresh the UIImage when the user taps button...
thanx...</description>
		<content:encoded><![CDATA[<p>yes there is memory leak about InternetImage.<br />
i just put a UIbutton in view.<br />
i pasted your code buttons event:<br />
[self downloadImageFromInternet:@"http://www.google.se/intl/en_com/images/logo_plain.png"];<br />
there is no memory leak when you first tap the button.<br />
but when you tap again<br />
there are memory leaks:<br />
InternetImage<br />
UIImage</p>
<p>i also changed your connection code:</p>
<p>	NSURL *url = [NSURL URLWithString:ImageUrl];<br />
	NSURLRequest *imageRequest = [[NSURLRequest alloc] initWithURL: url];<br />
	imageConnection = [[[NSURLConnection alloc] initWithRequest:imageRequest delegate:self] autorelease];</p>
<p>how can i solve it? i want to refresh the UIImage when the user taps button&#8230;<br />
thanx&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rutger Bevers</title>
		<link>http://blog.sallarp.com/asynch-uiimage-revisited/comment-page-1/#comment-9192</link>
		<dc:creator>Rutger Bevers</dc:creator>
		<pubDate>Tue, 06 Apr 2010 21:38:33 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sallarp.com/?p=108#comment-9192</guid>
		<description>I installed the example application on my iPhone.
It works most of the times, but sometimes the image is never loaded although I have a perfect connection.

You can test this by setting the iPhone into airplane mode and then turn it of. Now immediately when you get connection to the network start the application. The image will never load...</description>
		<content:encoded><![CDATA[<p>I installed the example application on my iPhone.<br />
It works most of the times, but sometimes the image is never loaded although I have a perfect connection.</p>
<p>You can test this by setting the iPhone into airplane mode and then turn it of. Now immediately when you get connection to the network start the application. The image will never load&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: NIVETHA</title>
		<link>http://blog.sallarp.com/asynch-uiimage-revisited/comment-page-1/#comment-3726</link>
		<dc:creator>NIVETHA</dc:creator>
		<pubDate>Tue, 25 Aug 2009 04:39:34 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sallarp.com/?p=108#comment-3726</guid>
		<description>thank u</description>
		<content:encoded><![CDATA[<p>thank u</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: NIVETHA</title>
		<link>http://blog.sallarp.com/asynch-uiimage-revisited/comment-page-1/#comment-3725</link>
		<dc:creator>NIVETHA</dc:creator>
		<pubDate>Tue, 25 Aug 2009 04:39:15 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sallarp.com/?p=108#comment-3725</guid>
		<description>Really very nice post...... it helped me very much</description>
		<content:encoded><![CDATA[<p>Really very nice post&#8230;&#8230; it helped me very much</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Björn Sållarp</title>
		<link>http://blog.sallarp.com/asynch-uiimage-revisited/comment-page-1/#comment-1535</link>
		<dc:creator>Björn Sållarp</dc:creator>
		<pubDate>Sun, 24 May 2009 05:54:03 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sallarp.com/?p=108#comment-1535</guid>
		<description>Hello Cedric,

1. In the demo app I allocate a single InternetImage, there is no previous instance to release.
2. Same with ImageConnection.

I suspect the memory leaks are in your own implementation.</description>
		<content:encoded><![CDATA[<p>Hello Cedric,</p>
<p>1. In the demo app I allocate a single InternetImage, there is no previous instance to release.<br />
2. Same with ImageConnection.</p>
<p>I suspect the memory leaks are in your own implementation.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Cedric Vandendriessche</title>
		<link>http://blog.sallarp.com/asynch-uiimage-revisited/comment-page-1/#comment-1517</link>
		<dc:creator>Cedric Vandendriessche</dc:creator>
		<pubDate>Sat, 23 May 2009 18:36:28 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sallarp.com/?p=108#comment-1517</guid>
		<description>Nice piece of code! But I have to say there are 2 memory leaks. 

1. You allocate InternetImage without releasing previous one.
2. Same as above but with imageConnection.

I also did this with an other class and also there there&#039;s some general memory leak. I contacted apple about it and they told me to test it on 3.0 latest béta but I don&#039;t want to lose my 2.2.1 install. Maybe you could test your code (or the URLCache apple sampleCode)

Thanks,

Cedric</description>
		<content:encoded><![CDATA[<p>Nice piece of code! But I have to say there are 2 memory leaks. </p>
<p>1. You allocate InternetImage without releasing previous one.<br />
2. Same as above but with imageConnection.</p>
<p>I also did this with an other class and also there there&#8217;s some general memory leak. I contacted apple about it and they told me to test it on 3.0 latest béta but I don&#8217;t want to lose my 2.2.1 install. Maybe you could test your code (or the URLCache apple sampleCode)</p>
<p>Thanks,</p>
<p>Cedric</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Adeem Basraa</title>
		<link>http://blog.sallarp.com/asynch-uiimage-revisited/comment-page-1/#comment-811</link>
		<dc:creator>Adeem Basraa</dc:creator>
		<pubDate>Tue, 05 May 2009 12:33:49 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sallarp.com/?p=108#comment-811</guid>
		<description>Thax for a neat code :)</description>
		<content:encoded><![CDATA[<p>Thax for a neat code <img src='http://blog.sallarp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Björn Sållarp</title>
		<link>http://blog.sallarp.com/asynch-uiimage-revisited/comment-page-1/#comment-682</link>
		<dc:creator>Björn Sållarp</dc:creator>
		<pubDate>Sat, 02 May 2009 00:57:17 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sallarp.com/?p=108#comment-682</guid>
		<description>It is open source. It&#039;s unfortunate that I wrote that in all the files previously. Everything on my blog is free to use and modify in any way you seem fit. I havn&#039;t updated all the &quot;old&quot; code samples with a free to use statement, but my intent is that the code posted on my blog is free to use and modify by anyone. 

If you appriciate and use the code I would like it if your link back from your site/blog.

Best regards,
Björn</description>
		<content:encoded><![CDATA[<p>It is open source. It&#8217;s unfortunate that I wrote that in all the files previously. Everything on my blog is free to use and modify in any way you seem fit. I havn&#8217;t updated all the &#8220;old&#8221; code samples with a free to use statement, but my intent is that the code posted on my blog is free to use and modify by anyone. </p>
<p>If you appriciate and use the code I would like it if your link back from your site/blog.</p>
<p>Best regards,<br />
Björn</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk (enhanced) (user agent is rejected)

Served from: blog.sallarp.com @ 2010-09-10 23:01:25 -->