aboutsummaryrefslogtreecommitdiff
path: root/Foundation/GTMSQLite.m
diff options
context:
space:
mode:
authorGravatar gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3>2009-03-13 04:30:22 +0000
committerGravatar gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3>2009-03-13 04:30:22 +0000
commiteb030f647c066da594c612db4ba482612842361e (patch)
treebe8671633087ba276cac332fce017744b724eed0 /Foundation/GTMSQLite.m
parent993a40ed9233e2b250978bcef385154818db3adb (diff)
[Author: dmaclach]
Fixes up the leaks in the tests. Sets up the RunMacOSUnitTest script so that it actually works correctly with respect to enabling leaks. DELTA=20 (4 added, 3 deleted, 13 changed) R=thomasvl
Diffstat (limited to 'Foundation/GTMSQLite.m')
-rw-r--r--Foundation/GTMSQLite.m21
1 files changed, 12 insertions, 9 deletions
diff --git a/Foundation/GTMSQLite.m b/Foundation/GTMSQLite.m
index 0c7df2e..0225ff5 100644
--- a/Foundation/GTMSQLite.m
+++ b/Foundation/GTMSQLite.m
@@ -240,9 +240,10 @@ static CFLocaleRef gCurrentLocale = NULL;
if (db_) {
int rc = sqlite3_close(db_);
if (rc != SQLITE_OK) {
- _GTMDevLog(@"Unable to close \"%@\", error code: %d", self, rc);
- _GTMDevLog(@"Did you forget to call -[GTMSQLiteStatement"
- @" finalizeStatement] on one of your statements?");
+ _GTMDevLog(@"Unable to close \"%@\", error code: %d\r"
+ @"Did you forget to call -[GTMSQLiteStatement"
+ @" finalizeStatement] on one of your statements?",
+ self, rc);
}
}
[path_ release];
@@ -1717,17 +1718,19 @@ static void Glob16(sqlite3_context *context, int argc, sqlite3_value **argv) {
#if GTM_SUPPORT_GC
- (void)finalize {
- _GTMDevAssert(!statement_,
- @"-[GTMSQLiteStatement finalizeStatement] must be called when"
- @" statement is no longer needed");
+ if (statement_) {
+ _GTMDevLog(@"-[GTMSQLiteStatement finalizeStatement] must be called when"
+ @" statement is no longer needed");
+ }
[super finalize];
}
#endif
- (void)dealloc {
- _GTMDevAssert(!statement_,
- @"-[GTMSQLiteStatement finalizeStatement] must be called when"
- @" statement is no longer needed");
+ if (statement_) {
+ _GTMDevLog(@"-[GTMSQLiteStatement finalizeStatement] must be called when"
+ @" statement is no longer needed");
+ }
[super dealloc];
}