Created
July 11, 2012 19:11
-
-
Save azsromej/3092479 to your computer and use it in GitHub Desktop.
Debugging with repeated memory warnings
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#warning REMOVE THIS BEFORE RELEASE | |
- (void)fireMemoryWarning:(NSTimer *)timer { | |
NSLog(@"<<<< posting simulated warning >>>>"); | |
[[UIApplication sharedApplication] performSelector:@selector(_performMemoryWarning)]; | |
} | |
#warning REMOVE THIS BEFORE RELEASE | |
-(void) debugWithRepeatedMemoryWarnings { | |
[NSTimer scheduledTimerWithTimeInterval:20 target:self | |
selector:@selector(fireMemoryWarning:) | |
userInfo:nil | |
repeats:YES]; | |
} | |
// Add the following line to application:didFinishLaunchingWithOptions: | |
[self debugWithRepeatedMemoryWarnings]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment