diff options
author | Jay Freeman <saurik@saurik.com> | 2008-08-02 10:17:43 +0000 |
---|---|---|
committer | Jay Freeman <saurik@saurik.com> | 2008-08-02 10:17:43 +0000 |
commit | 5223c578d9632b9faf88621728ae22787bed177f (patch) | |
tree | 288d0f31be75a44154b47dfa1b6b6b7a132b689a | |
parent | 9dc5582fea127dddd443efa44b8bed53ad575574 (diff) |
Tried to fix the memory leak issue and failed.
git-svn-id: http://svn.telesphoreo.org/trunk@413 514c082c-b64e-11dc-b46d-3d985efe055d
-rw-r--r-- | data/sqlite3/tempdir.diff | 4 |
1 files changed, 3 insertions, 1 deletions
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 + |