From 5223c578d9632b9faf88621728ae22787bed177f Mon Sep 17 00:00:00 2001 From: Jay Freeman Date: Sat, 2 Aug 2008 10:17:43 +0000 Subject: Tried to fix the memory leak issue and failed. git-svn-id: http://svn.telesphoreo.org/trunk@413 514c082c-b64e-11dc-b46d-3d985efe055d --- data/sqlite3/tempdir.diff | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'data') diff --git a/data/sqlite3/tempdir.diff b/data/sqlite3/tempdir.diff index b4762ac44..839ee7393 100644 --- a/data/sqlite3/tempdir.diff +++ b/data/sqlite3/tempdir.diff @@ -48,17 +48,19 @@ diff -ru sqlite-3.5.9/src/os_unix.c sqlite-3.5.9+iPhone/src/os_unix.c /* It's odd to simulate an io-error here, but really this is just ** using the io-error infrastructure to test that SQLite handles this -@@ -2516,6 +2526,16 @@ +@@ -2516,6 +2526,18 @@ */ SimulateIOError( return SQLITE_ERROR ); +#ifdef __APPLE__ + if (azDirs[1] == NULL) { ++ NSPushAutoreleasePool(); + cfstr = (CFStringRef) NSTemporaryDirectory(); + maxsize = CFStringGetMaximumSizeForEncoding(CFStringGetLength(cfstr), kCFStringEncodingUTF8) + 1; + cstr = malloc(maxsize); + CFStringGetCString(cfstr, cstr, maxsize, kCFStringEncodingUTF8); + azDirs[1] = cstr; ++ NSPopAutoreleasePool(); + } +#endif + -- cgit v1.2.3