From eb030f647c066da594c612db4ba482612842361e Mon Sep 17 00:00:00 2001 From: "gtm.daemon" Date: Fri, 13 Mar 2009 04:30:22 +0000 Subject: [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 --- Foundation/GTMSQLite.m | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'Foundation/GTMSQLite.m') 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]; } -- cgit v1.2.3