3

我使用sqlite数据库进行存储。还有许多数据库事务。我的问题是 sqlite 页面缓存的内存使用量迅速增长。在instruments我可以找到这条线

Graph   Category                 Live Bytes   # Living # Transient  Overall Bytes   
0       VM: SQLite page cache    12.12 MB     97       1434         191.38 MB   

在里面我有97个以下文件

#   Address     Category                Timestamp     Live  Size        Responsible Library     Responsible Caller
0   0x4c06000   VM: SQLite page cache   00:49.241.377   •   128.00 KB   libsystem_kernel.dylib  vm_allocate
1   0x5002000   VM: SQLite page cache   01:41.203.588   •   128.00 KB   libsystem_kernel.dylib  vm_allocate
2   0x5515000   VM: SQLite page cache   01:41.255.275   •   128.00 KB   libsystem_kernel.dylib  vm_allocate
3   0x5535000   VM: SQLite page cache   01:41.309.973   •   128.00 KB   libsystem_kernel.dylib  vm_allocate
4   0x5565000   VM: SQLite page cache   01:41.358.003   •   128.00 KB   libsystem_kernel.dylib  vm_allocate
5   0x55c8000   VM: SQLite page cache   01:41.407.916   •   128.00 KB   libsystem_kernel.dylib  vm_allocate
6   0x568f000   VM: SQLite page cache   01:41.451.870   •   128.00 KB   libsystem_kernel.dylib  vm_allocate
7   0x570d000   VM: SQLite page cache   01:41.501.194   •   128.00 KB   libsystem_kernel.dylib  vm_allocate
8   0x573d000   VM: SQLite page cache   01:41.550.465   •   128.00 KB   libsystem_kernel.dylib  vm_allocate

任何想法是什么原因或如何删除这些文件将不胜感激。谢谢!

4

1 回答 1

3

找到了答案,这只是sqlite我错误放置的select方法sqlite3_close(mySqliteDB);而不是sqlite3_finalize(statement);

于 2013-10-04T06:46:09.960 回答