how to release shared resources, save user data, invalidate timers, and store enough

Discussion in 'iOS Programming' started by tranvutuan, Jan 26, 2012.

  1. tranvutuan macrumors member

    Joined:
    Dec 19, 2011
    #1
    Hi everyone
    My purpose is after hitting the Home button from the device, I want to clear all release shared resources, save user data by using
    Code:
    (void)applicationDidEnterBackground :(UIApplication *)application
    Can somebody give me a hint how to do it. Thanks a lot
     
  2. jonnymo5 macrumors 6502

    Joined:
    Jan 21, 2008
    Location:
    Texas
    #2
    This really depends on your shared resources and how you deal with user data. You should also really consider if you want to clear those resources just because you went into background. Sometimes it is better to hang onto that memory in case the user is coming right back. If it will take a noticeable amount of time to repopulate then just keep it and release if you get low memory warning.
     

Share This Page