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 6655885
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T01:34:30+00:00 2026-05-26T01:34:30+00:00

animating with UIImageview takes the following steps create autoreleased UIImageView create array of image

  • 0

animating with UIImageview takes the following steps

  1. create autoreleased UIImageView
  2. create array of image
  3. assign the image array to UIImageView’s animationImages property
  4. set other properties
  5. add UIImageView to a view as subview
  6. startAnimating

I’m worried about memory leak.
Would the imageView get dealloc-ed as long as the UIImageView is autoreleased object?

  • 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-26T01:34:31+00:00Added an answer on May 26, 2026 at 1:34 am

    It sounds like you want the image view to go away after the animation is complete. As it is, it will not. It will remain a subview. I’m not sure what it will look like when the animation is complete.

    It’s not a memory leak per-se, since the view still has a pointer to the image view, but if you repeat the above over and over again you will have less and less memory. You need to remove the image view from its parent view at some point.

    Probably what you can do is create an animation using [UIView animateWithDuration:animations:completion:]. Give it a duration equal to the duration of your animated image. In the animations block do nothing. In the completion block remove the image view from its superview.

    Or just do performSelectorAfterDelay to call something that removes the view. Not sure if one will better guarantee synchronization with the animation of the sequence of images.

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

Sidebar

Related Questions

I'm currently using a UIImageView with an array of images to create a small
I am animating images with UIImageView: imageView.animationImages = [NSArray arrayWithArray:imgNameArr]; imageView.animationDuration = 2; imageView.animationRepeatCount
I have an array of images loaded into a UIImageView that I am animating
I'm animating a UIView's frame property using a CAKeyframeAnimation on the view's CALayer and
On simulation, after i load the UIView that contains 52 UIImageView; it takes at
I need to mask a whole animation that takes place in a UIImageView. I
i have two views and one viewcontroller: one contains UIImageView with image, second have
I want to add a array of UIImages to UIImageView using NSTimer. Such that
I need to play frame based animations. I tried the UIImageView with animationImages but
How can I flip a UIImageView 180 degrees, but NOT animating the flip. I

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.