On Jul 26, 2008, at 2:12 PM, Ben Smith wrote:

> Hi Folks -
>
> I have an issue (that others are reporting as well at Apple
> discussions); when using the built in SQLite3 library it seems that
> finalize and close doesn't actually release all of the memory of a
> particular connection.  It isn't reported as a leak or anything.  But
> if you use instruments you can see that the libsqlite3  is sitting
> there talking up memory (not a lot).  It doesn't seem to have anything
> to do with what the db has in it or anything, it's just based on the
> number connections you have ever established (even if they have all
> been killed).
>
>
> Is this a known issue?  Or am I doing something wrong (_close and
> _finalize are the only two de-constructors or is there something else
> I should be doing as well).


SQLite is carefully tested to ensure that all memory is released after  
finalize & close.  Such a memory leak would show up on all of our  
standard tests and would be very in-your-face.  It is not the kind of  
thing we are likely to miss.  I would be surprised to find that this  
is something in the SQLite core.

Are you certain that all prepared statements are finalized prior to  
calling sqlite3_close()?

I have no idea what kind of VFS layer is being used for the iPhone.   
It might be something custom.  If so, there could be a leak in the VFS  
layer someplace.

D. Richard Hipp
[EMAIL PROTECTED]



_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to