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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T02:36:52+00:00 2026-05-28T02:36:52+00:00

My app, which uses ARC, does the following: Uploads a picture taken by the

  • 0

My app, which uses ARC, does the following:

  1. Uploads a picture taken by the camera
  2. Compresses the picture for use as a thumbnail.
  3. I do this using [UIImage imageWithData:UIImageJPEGRepresentation( original, 0.1f )]
  4. I set the uncompressed picture reference to nil for ARC to free the memory

Repeating this sequence will mean that several compressed thumbnails are on the screen. After about 7 or 8 pictures, the app wil crash due to low memory.

In Instruments, I am attempting to use Allocations in tandem with Memory Monitor to find the source of my problem.

Some Instruments stats:

Allocation – Live Bytes jumps by about 2 MB after taking a picture, but then goes down by 1.5 MB after original picture reference is set to nil. That seems to be a good thing, but…

Here’s an eventual state of the application. #Living seems to be very high relative to the Live Bytes, right?

  Live Bytes  #Living   #Transitory  Overall   #Overall Bytes    
   3.72 MB    24538     80679        90.1 MB   105301

Memory Monitor (tracking inspection head) – My application starts up at 7.5 MB and taking one picture results in that increasing by ~13 MB. For the state that I listed above, Memory Monitor says that the app is taking up 72.67 MB of “Real Memory” and 123.79 MB of Virtual Memory.

Given that the Live Bytes are very small, I know I’m doing something right.
However, given that the memory footprint in other places is large, I’m also sure I’m doing something very wrong. Any ideas what that might be, or how to track it down?

  • 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-28T02:36:52+00:00Added an answer on May 28, 2026 at 2:36 am

    Eitan27,

    This is not an ARC problem. This is about how to manage multiple large items in memory. iOS has several mechanisms to help you here. If you write the image to flash and then reopen it as memory mapped data, you will mostly solve your problem. How? The OS manages the mapping into your resident memory footprint with immutable data. Because these items are immutable and, hence, never dirty, it can then flush the mapped pages when necessary. The downside of this mechanism is the limited number of file descriptors available to each app.

    Andrew

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

Sidebar

Related Questions

I have an iOS-App which uses ARC. I don't use InterfaceBuilder, all UI is
I have an android app which uses camera. I am using a socket connection
Im developing an app which uses the tcp connection. currently im communicating using hard
I have an app which uses an engine. I generated a cell inside this
I am writing an app which uses GnuPlot for ploting data. Instead of using
I'm creating an app which uses Facebook and GCM. A user can use the
I am developing an app which uses the phone's default camera application to capture
I have an app which uses some usercontrols. I want to take a thumbnail
I have created an app which uses Application Settings and user defaults following the
I have an iPhone app which uses iAd...The app crashes sometime with the following

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.