Skip to content

Commit

Permalink
Fix of issue atg#46: resurrection error in [FMDatabase clearCachedSta…
Browse files Browse the repository at this point in the history
…tements]
  • Loading branch information
cgrushko committed Aug 17, 2012
1 parent 3e4b488 commit 925c8bf
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions FMDatabase.m
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,9 @@ - (BOOL)close {

- (void)clearCachedStatements {

NSEnumerator *e = [cachedStatements objectEnumerator];
FMStatement *cachedStmt;

while ((cachedStmt = [e nextObject])) {
[cachedStmt close];
for (NSString *key in cachedStatements) {
FMStatement *cachedStmt = [cachedStatements objectForKey:key];
[cachedStmt close];
}

[cachedStatements removeAllObjects];
Expand Down

0 comments on commit 925c8bf

Please sign in to comment.