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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T06:48:40+00:00 2026-06-08T06:48:40+00:00

To check the memory usage of an iOS app, say if the code is

  • 0

To check the memory usage of an iOS app, say if the code is

int n = 1000000;

NSObject *bar = [[NSObject alloc] init];

foo = [[NSMutableArray alloc] initWithCapacity: n];
for (int i = 0; i < n; i++) {
    [foo addObject: bar];
}

we can start Instruments and click on Library on toolbar and chose “Memory Monitor”.

But it seems that if I change the code to

n = 10;

and stop Intruments’ Record, and restart Record, the memory use is the same. I have to stop Record, recompile the code in Xcode, and run it, and stop it, and then come back to Instruments and click Record to see the new memory use? Is it always needed to go through that many steps, or is there any simpler way, or even if we can use NSLog to print memory use right inside touchesBegan so whenever we touch the screen, the memory use is printed?

  • 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-08T06:48:42+00:00Added an answer on June 8, 2026 at 6:48 am

    The profile command in Xcode (cmd-I) should do a build and then restart the run in Instruments.

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

Sidebar

Related Questions

Instruments can be used to check the short-term memory usage of an app, but
What is the best way to check memory usage in an ASP.NET MVC3 application?
I use top to check the memory usage of My own program , it
We need to write a C/C++ code that will check whether the memory allocated
How may I check the memory usage of Safari (or any other running process)
I have to check memory performance of my application, I have solved Leaks now
Is there a way/tool to check memory leak of Cocoa Touch project? or I
I would like to check the memory consumption of each running processes individually, cat
I would like to know that how we can check the available memory in
I'm using malloc to make an error check of whether memory can be allocated

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.