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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T05:11:26+00:00 2026-06-01T05:11:26+00:00

I have a memory leak from 3 UIImages the problem is I can’t just

  • 0

I have a memory leak from 3 UIImages the problem is I can’t just release them anywhere in my code because they are getting used in many different spots at all times and I don’t know where it all is (over 20,000 lines of code) so my question is if say every 10 seconds I take one of those UIImages, create a blank placeholder UIImage, set that blank UIImage’s image to be the original UIImage’s image. Release the original UIImage, Now set the original UIImage’s image equal to the placeholder UIImage and then release the placeholder UIImage, will this work? If I set a UIImage a thousand times and then release it at the very end does it clear all the data or do I have to release it a thousand times?

  • 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-06-01T05:11:28+00:00Added an answer on June 1, 2026 at 5:11 am

    I don’t really understand what you want to do but you only have one solution anyway: fix the memory leak. Everything else is likely just moving your issues around until everything falls apart.

    Since you seem to have leaks you likely don’t follow the Apple memory management guidelines strictly enough. It’s vital that you read, understand and obey to this document, it’s probably the most important document regarding iOS development that you need to understand. If you do, you can keep even huge projects absolutely memory leak free. If you don’t, you’ll end up with leaks and crashes.

    Luckily Apple already can help you find a lot of issues: Press “Analyze” in Xcode and fix all issue that the static analyzer finds. Except for a few rare exceptions, the issues that are reported by the analyzer are real problems that need to be fixed. Same goes for compiler warnings, BTW. Your project should yield not a single warning and not a single static analyzer issue, no matter how big your app is (I can tell you from first-hand experience working on an app with several man years of work that this not only is possible, it’s the only way to keep sanity).

    If the static analyzer doesn’t find the memory mismanagement you’ll need to bite the bullet and analyze all the spots where the images are used by hand and maybe rewrite a few classes. Every workaround will just shift the work you’ll need to do to a later time and maybe even make matters worse.

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

Sidebar

Related Questions

I have a memory leak with below code. If I use [sub release]; after
I have just discovered a nasty memory leak using both each_array() and each_arrayref() from
I have got a memory leak problem in the example below(u can download the
I have a problem with a memory leak in a .NET CF application. Using
I have a problem related to Memory Leak. In my app I have to
My application has a memory leak resulting from my usage of JDBC. I have
I have some PL/SQL code that I think might have a memory leak. Everytime
I believe I have memory leak with some of my code that uses the
I have an issue with a memory leak. I have a base-class pointer. From
I think that I have a memory leak in my app witch I can't

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.