Memory management when using sqlite database in iphone

前端 未结 6 1278
我在风中等你
我在风中等你 2021-02-03 16:18

My application makes use of a SQLite database to store the user\'s inputs. The number of records in the input would go to around 100 records and I have a lot of SQL operations g

6条回答
  •  悲哀的现实
    2021-02-03 16:43

    Sqlite uses a cache for requests. Close & reopen the database from time to release cache memory.

    You shouldnt care unless your memory requirements are high.

    You can catch critical conditions in the UIApplicationDelegate method applicationDidReceiveMemoryWarning or UIViewController delegate method didReceiveMemoryWarning

    If one of these methods is called, close & reopen the database.

提交回复
热议问题