Serious memory leaks

116 views
Skip to first unread message

shenzy

unread,
Feb 16, 2012, 2:32:20 AM2/16/12
to ASIHTTPRequest
Hello

I am attempting to download web sites with ASIHTTPRequest. It is a
great library.

However, I am currently encountering serious memory leaks as described
below. I used Analyze in XCode but found no warnings. I also searched
answers by using google and viewed past discussion in this
communication group, but both resulted in no related answers.

Therefore I start this thread in the hope that somebody may help me. I
will appreciate any of your hints or advices very much. Thank you in
advance.

------------------------------------------------------
Descriptions of the memory leaks:
------------------------------------------------------
The memory leaks happened when I use NSOperationQueue with
ASIHTTPRequest to download a website and its linked html files. Codes
followed the instructions at http://allseeing-i.com/ASIHTTPRequest.

1. Experiment 1 for site A which has 368 files in total.
1.1 (Start the app) At the first time, it cost 22 MB to download all
files. Memory decreased from 119MB to 97MB.
1.2 (Clear the cache and continue the app) At the second time which
started after clearing the cache, it cost 16 MB to download same
files. Memory decreased from 97MB to 81MB.
1.3 (Clear the cache and continue the app) At the third time, it
crashed soon after the third time began. Memory decreased from 81MB to
10MB when finishing downloading first 100 files.

2. Experiment 2 for site B which has 292 files in total.
2.1 (Start the app) At the first time, it cost 25 MB to download all
files. Memory decreased from 121MB to 95MB.
2.2 (Clear the cache and continue the app) After the second time that
started after clearing the cache, it cost 88 MB to download same
files. Memory decreased from 96MB to 8MB.
2.3 (Start the app) It also cost 25BM, the same as 2.1
2.4 (Clear the cache and continue the app) It cost 96MB

3. Experiment 3 for site C which has 280 files in total.
3.1 (Start the app) Cost 8 MB (128MB -> 120MB)
3.2 (Clear the cache and continue the app) Cost 7MB (119MB -> 112MB)
3.3 (Clear the cache and continue the app) Cost 6MB (112MB -> 106MB)
3.4 (Clear the cache and continue the app) Cost 5MB (107MB -> 102MB)
3.5 (Clear the cache and continue the app) Cost 6MB (13MB -> 97MB)

------------------------------------------------------
Conclusions:
------------------------------------------------------
1. All experiments experienced memory leaks.
2. Total leaked MBs varied according to unknown reasons.
3. For some unknown reasons, memory may suddenly decrease by huge
amount, like 1.3, 2.2, 2.4
4. Only experiment 3 for site C showed steady memory leaks.

------------------------------------------------------
Need you help! Thank you!
------------------------------------------------------

shenzy

unread,
Feb 16, 2012, 6:09:09 AM2/16/12
to ASIHTTPRequest
Hello,
I Solved my issue! It occurred in my sub-classed codes because of
using a same variable name.
Sorry for asking not a wise question.
shenzy

yalamandarao inaganti

unread,
Feb 17, 2012, 6:17:21 AM2/17/12
to asihttp...@googlegroups.com
<description>&lt;div
align="center"&gt;&lt;!--dle_image_begin:http://downmagaz.ws/uploads/posts/2012-02/1329393907_ipadiphone.jpg|--&gt;&lt;img
src="http://downmagaz.ws/uploads/posts/2012-02/1329393907_ipadiphone.jpg"
alt="iPad &amp;amp; iPhone User No.59 - 2012" title="iPad &amp;amp;
iPhone User No.59 - 2012"
/&gt;&lt;!--dle_image_end--&gt;&lt;/div&gt;&lt;br /&gt;&lt;div
align="center"&gt;&lt;b&gt;iPad &amp; iPhone User No.59 -
2012&lt;/b&gt;&lt;br /&gt;PDF | 100 pages | 102.61 Mb |
English&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;iPad &amp; iPhone
User&lt;/b&gt; covers the best apps, the latest kit and the hottest
gadgets. Each issue features extensive reviews, news and opinions on
the latest iPad and iPhone products, as well as step-by-step guides
and tutorials on how to get the most from your Apple gadgets and the
App Store.&lt;img
src="http://feeds.feedburner.com/~r/DownloadMagazine/~4/LdriCrL13EE"
height="1" width="1"/&gt;</description>


how to get image file in object c...... plz tell me....

Reply all
Reply to author
Forward
0 new messages