dealloc compiled-sql statements before removing references of SQLiteClosable objects from SQLiteDatabase obj. otherwise, code will attempt to close database before deallocing the compiled-sql statements and that causes sqlite exceptions.