enormego/egodatabase

Memory Leak

Opened this issue · 3 comments

According to Instruments, there's a memory leak in - (BOOL)open. It specifically points to:

int err = sqlite3_open([databasePath fileSystemRepresentation], &handle);

If used frequently, this has a horrendous effect on RAM usage. Please fix! :)

How do you suggest to fix that line? Opening a database might be a leak if you don't close it when you are finished with it.

The leak persists even if closed. I haven't studied the sqlite.c code as I can only do ObjC, sorry :/

That's a weird way to put it, since ObjC is a superset of C and it's people who only know C who can't grok Objc.

Anyway, sqlite comes from the SDK, so there's not much egodatabase can do if the leak comes from sqlite itself and you should file a bug report against Apple (https://bugreport.apple.com/). Unless you are rolling your own sqlite version, in which case you should report the bug to the sqlite guys directly (http://www.sqlite.org/).