i'm recently researching ways to disable dimming, screen saver and sleep while an app is in full screen, and this is what i've discovered:
i've noticed that the keepAwakeTimer is retained, and will fire off ever 30 seconds... does that mean that every 30 second the app will allocate memory without releasing it?
Code:
- (void)preventSleep
{
keepAwakeTimer = [[NSTimer scheduledTimerWithTimeInterval:30
target:self selector:@selector(stayAwake:) userInfo:nil repeats:
YES] retain];
}
- (void)stayAwake:(NSTimer *)sleepTimer
{
UpdateSystemActivity(OverallAct);// This is from Apple Tech Note
QA1160:Preventing Sleep
}
i've noticed that the keepAwakeTimer is retained, and will fire off ever 30 seconds... does that mean that every 30 second the app will allocate memory without releasing it?