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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T19:51:22+00:00 2026-05-14T19:51:22+00:00

I know i can simulate a memory warning on the simulator by selecting ‘Simulate

  • 0

I know i can simulate a memory warning on the simulator by selecting ‘Simulate Memory Warning’ from the drop down menu of the iPhone Simulator. I can even make a hot key for that.

But this is not what I’d like to achieve. I’d like to do that from the code by simply, lets say doing it every 5 seconds. Is that possible?

  • 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-14T19:51:22+00:00Added an answer on May 14, 2026 at 7:51 pm

    It is pretty easy actually, however it relies on an undocumented api call, so dont ship your app with it (even if it is in a inaccessible code path). All you have to do is use [[UIApplication sharedApplication] _performMemoryWarning];.

    This method will have the app’s UIApplication object post the UIApplicationDidReceiveMemoryWarningNotification and call the applicationDidReceiveMemoryWarning: method on the App Delegate and all UIViewControllers.

    -(IBAction) performFakeMemoryWarning {
      #ifdef DEBUG_BUILD
        SEL memoryWarningSel = @selector(_performMemoryWarning);
        if ([[UIApplication sharedApplication] respondsToSelector:memoryWarningSel]) {
          [[UIApplication sharedApplication] performSelector:memoryWarningSel];
        }else {
          NSLog(@"Whoops UIApplication no loger responds to -_performMemoryWarning");
        }
      #else
        NSLog(@"Warning: performFakeMemoryWarning called on a non debug build");
      #endif
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Does anyone know of a class/library/etc. that can simulate 32 bit unsigned integers on
Anyone know any softwares that can simulate human interaction on desktop browser specifically by
We all know you can simulate closures in C++98 by defining local structs/classes inside
So far, I know that in Rails I can simulate a PUT request using
We all know that you can simulate click or any other event on an
How i can simulate a double mouse click on window ( i know handle
I am working on Gateway Simulator which can simulate 1000 gateway.Gateway is connected with
Is there a way I can simulate various connection speeds from within Chrome? I
I want to know can we have a JPanel with a Layout other than
This is something I know can be done somehow , because I've done it

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.