memory leak (?) after sqlite+fmdb vacuum command

给你一囗甜甜゛ 提交于 2019-12-06 04:17:07

I posted this question on the sqlite-users list and got a response that suggested reducing the cache size for sqlite. This is done by executing the following statement (adjusting the size value as desired):

pragma cache_size = 100

EDIT: here's another nifty trick for releasing SQLite memory. Be sure to #define SQLITE_ENABLE_MEMORY_MANAGEMENT.

Documented here: http://www.sqlite.org/c3ref/release_memory.html

int bytesReleased = sqlite3_release_memory( 0x7fffffff );
NSLog( @"sqlite freed %d bytes", bytesReleased );
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!