Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4330620
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T09:59:15+00:00 2026-05-21T09:59:15+00:00

Upon running my application using Leaks, I found the following leaking. The leaks occur

  • 0

Upon running my application using Leaks, I found the following leaking. The leaks occur where shimmer and shimmerAnimation are allocated. I cannot see what would cause this leak. Can someone point me in the correct direction?

float duration = .5f;
NSArray *shimmer = [NSArray arrayWithObjects:
                    [UIImage imageNamed:@"shimmer_1.png"],
                    [UIImage imageNamed:@"shimmer_2.png"],
                    [UIImage imageNamed:@"shimmer_3.png"],
                    [UIImage imageNamed:@"shimmer_4.png"],
                    [UIImage imageNamed:@"shimmer_1.png"], nil];

UIImageView *shimmerAnimation = [[UIImageView alloc] initWithFrame:[self bounds]];
[UIView setAnimationDelegate:shimmerAnimation];
[UIView setAnimationDidStopSelector:@selector(removeFromSuperview)];
[shimmerAnimation setAnimationImages:shimmer];
[shimmerAnimation setAnimationDuration:duration];
[shimmerAnimation setAnimationRepeatCount:1];
[shimmerAnimation startAnimating]; 
[self addSubview:shimmerAnimation];
[shimmerAnimation release];
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T09:59:16+00:00Added an answer on May 21, 2026 at 9:59 am

    You add the shimmerAnimation object as a subview of self. That’ll retain it. If self is leaking, then your shimmerAnimation would be leaking too, and since it’s retaining shimmer, it would leak as well. So I’d check self to see what it’s doing.

    The calls to [UIImage imageNamed:…] cache the images they load. I don’t think those come up as leaks though.

    Oh, and you’re using [UIView setAnimationDelegate:] but you’re not calling [UIView beginAnimation:] which means the didStopSelector will never get called, and hence, if you’re using that to remove it from the subview (which you are) it won’t be. There’s your most likely culprit.

    [UIView setAnimationDelegate:] and friends are used for UIView animations, not for UIImageView image animations.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My application is using an image processing library to handle a long running task.
We are develping an application using PHP and Symfony framework. Ideally the system would
I have a running Java GWT application, that I can compile using Eclipse. Now
I have an application running with a working table called ANIMAL. Upon first creating
I have a Java web application running on JBoss using JAAS for authentication. I
I'm running into the following issue with a WAR I am generating using Warbler
We're using CRM On-Demand for our Service Group and I'm running into an application
I have a location using our ASP.NET 4.0 web application which was running fine
I am trying to get my ZEND application up on my apache server running
Upon running rake db:migrate, I'm getting an database configuration does not specify adapter error.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.