1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-14 00:22:38 +03:00

Added an assert() to detect lookaside memory leaks. Also added the

SQLITE_OMIT_LOOKASIDE compile-time option which is useful in trying to
track down lookaside memory leaks. (CVS 5800)

FossilOrigin-Name: 0c4c66071a46cecc5f87afb8f8f01ae2c90ee9b3
This commit is contained in:
drh
2008-10-11 15:38:29 +00:00
parent 99655beecf
commit 4150ebf86f
4 changed files with 17 additions and 10 deletions

View File

@@ -14,7 +14,7 @@
** other files are for internal use by SQLite and should not be
** accessed by users of the library.
**
** $Id: main.c,v 1.506 2008/10/11 15:20:05 drh Exp $
** $Id: main.c,v 1.507 2008/10/11 15:38:30 drh Exp $
*/
#include "sqliteInt.h"
#include <ctype.h>
@@ -635,6 +635,7 @@ int sqlite3_close(sqlite3 *db){
sqlite3_mutex_leave(db->mutex);
db->magic = SQLITE_MAGIC_CLOSED;
sqlite3_mutex_free(db->mutex);
assert( db->lookaside.nOut==0 ); /* Fails on a lookaside memory leak */
if( db->lookaside.bMalloced ){
sqlite3_free(db->lookaside.pStart);
}