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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T22:02:50+00:00 2026-05-15T22:02:50+00:00

I am having a problem with memory I cant get straightened out. What I

  • 0

I am having a problem with memory I cant get straightened out. What I am doing is this:

I have a viewcontroller that looks similar to a book with 7 different tabs. Each time the user presses a tab, the content on the “page” changes and the background image changes to reflect the different tab selected. Each background image is 768×1024 and there is one for each of the 7 tabs.

My problem is that when each tab is selected, the memory is never released for the previous image, and after 7 tabs are selected I have something like 30MB being used up for 7 different images. I have 7 different methods for each of the 7 tabs that the user presses.

-(IBAction) pressedTab1 {

    self.tabsImageView.image = nil; //tabsImageView is the imageView I am keeping he background image in.
    UIImage *tempUIImage = [UIImage imageNamed:@"tab1selected.png"]; 

    self.tabsImageView.image = tempUIImage;


}
  • 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-15T22:02:50+00:00Added an answer on May 15, 2026 at 10:02 pm

    There is no leak in the code that you have posted. When you tapped all 7 tabs then your app reaches 30MB of memory. But what happens if you continue to switch among tabs? Does it continue to increase in every switch? If yes, then you definitely have leak in some other portion. If not (i.e memory is more or less 30MB constant), then this might not be a problem at all. Sometimes system don’t free up things until memory is required and 30MB is acceptable. It may also cache image data. You don’t need to be worried in this case. Though I have found no Apple doc stating this feature, I have faced a similar scenario.

    Apart from your original question, one thing is you should really avoid such big images (768×1024 pixel). This may cause huge problem, at least in low end devices.

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

Sidebar

Related Questions

I'm having a problem getting more memory out of PHP. This is the error
I'm having a memory problem related to UIImageView. After adding this view to my
Im having problem in my UIscrollView ,this is what I have done: Whenever a
I am having problem to get a numerical value for this expression where I
hey there i am having problem i have List<List<memoryCard>> that i want to show
I'm having a strange problem with Android 1.6 I have an application that has
I'm working on a memory game for Android and I'm having a problem. When
I am having problems with memory addressing in MIPS. It says that the addressing
I have a problem that I haven't been able to find a solution to,
The book Learning jQuery says IE has memory leak for the DOM object having

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.