Note that there are some explanatory texts on larger screens.

plurals
  1. POUIImageView memory leak crash issue - Objective C
    primarykey
    data
    text
    <p>I am trying to build up my app with the images thumbnails which I loaded from server. The images are in large number. So when I try to run in my iPod it crashes after loading some 50 to 60 images. And the crash is because of the memory leak that I came to know by testing my app with instruments. I have used imageViews and a button for each imageView, and I also released those objects. Here is my code that I have used in my app. </p> <pre><code>NSInteger result = [self loadedBlipCount] + (_feed.hasMore ? 1 : 0); if (result == 0 &amp;&amp; _emptyFeedCell) result = 1; int outer_count = result/3; scroll_view.backgroundColor = [UIColor whiteColor]; scroll_view.delegate = self; for (int i=0; i&lt;outer_count; i++) //if (i&lt;outer_count) { xPos = 10; for (int j=0; j&lt;3; j++) { _blipyy = [_feed blipAtIndex:count]; image_view = [[URLImageView alloc] initWithFrame:CGRectMake(xPos, yPos, 90, 90)]; image_view.tag = count_tag; image_view.url = _blipyy.image_tab_images; UIButton *img_butt = [[UIButton alloc] initWithFrame:CGRectMake(xPos, yPos, 90, 90)]; img_butt.tag = count_tag + 10000; [img_butt addTarget:self action:@selector(image_tapped:) forControlEvents:UIControlEventTouchUpInside]; xPos = xPos + 95; count = count + 1; count_tag = count_tag + 1; //count_1= count_1 +1; [scroll_view addSubview:image_view]; [scroll_view addSubview:img_butt]; [image_view release]; [img_butt release]; //[image_view release]; } // }); yPos = yPos + 95; } </code></pre> <p>Please help me with this issue. Thanks in Advance!!</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload