Re: [sqlite] Memory ownership for sqlite3_temp_directory

2014-07-24 Thread Richard Hipp
On Wed, Jul 23, 2014 at 1:29 PM, Nicolás Brailovsky wrote: > > Android. If I don't specify the temp dir, I end up triggering a bunch of > bugs in fuse :) > We've heard that before. And we had a patch in the code at

Re: [sqlite] Memory ownership for sqlite3_temp_directory

2014-07-23 Thread Richard Hipp
On Wed, Jul 23, 2014 at 1:29 PM, Nicolás Brailovsky wrote: > > What platform are you running on that you feel like you need to specify a > > temporary directory other than the system default? > > Android. If I don't specify the temp dir, I end up triggering a bunch of >

Re: [sqlite] Memory ownership for sqlite3_temp_directory

2014-07-23 Thread Nicolás Brailovsky
> What platform are you running on that you feel like you need to specify a > temporary directory other than the system default? Android. If I don't specify the temp dir, I end up triggering a bunch of bugs in fuse :) Cheers Nicolás Brailovsky - Tech blog http://monoinfinito.wordpress.com On

Re: [sqlite] Memory ownership for sqlite3_temp_directory

2014-07-23 Thread Richard Hipp
On Wed, Jul 23, 2014 at 1:20 PM, Nicolás Brailovsky wrote: > > Set sqlite3_temp_directory once when the process starts (and then > > only if you really need it) then leave it alone for the remainder of the > > live of the process. Do not try to reclaim memory. > > Fair

Re: [sqlite] Memory ownership for sqlite3_temp_directory

2014-07-23 Thread Nicolás Brailovsky
> Set sqlite3_temp_directory once when the process starts (and then > only if you really need it) then leave it alone for the remainder of the > live of the process. Do not try to reclaim memory. Fair enough. Would you recommend any alternatives to replace temp_directory altogether? Cheers

Re: [sqlite] Memory ownership for sqlite3_temp_directory

2014-07-23 Thread Richard Hipp
On Wed, Jul 23, 2014 at 12:10 PM, Nicolás Brailovsky < nicolasbra...@gmail.com> wrote: > > How would you suggest to implement the cleanup for sqlite3_temp_directory? > Don't. Set sqlite3_temp_directory once when the process starts (and then only if you really need it) then leave it alone for

Re: [sqlite] Memory ownership for sqlite3_temp_directory

2014-07-23 Thread Nicolás Brailovsky
Thanks for your reply Richard > >* 1. Is the memory for sqlite3_temp_directory ever cleaned up? *> >> > Not by SQLite. That memory is the responsibility of the application that > allocated it. Given the memory may be cleaned up by sqlite itself in some cases: 1. Freeing it after calling

Re: [sqlite] Memory ownership for sqlite3_temp_directory

2014-07-23 Thread Richard Hipp
Document updated here: http://www.sqlite.org/draft/c3ref/temp_directory.html On Wed, Jul 23, 2014 at 11:36 AM, Richard Hipp wrote: > > > > On Wed, Jul 23, 2014 at 11:31 AM, Nicolás Brailovsky < > nicolasbra...@gmail.com> wrote: > >> Is the memory used by sqlite3_temp_directory

Re: [sqlite] Memory ownership for sqlite3_temp_directory

2014-07-23 Thread Richard Hipp
On Wed, Jul 23, 2014 at 11:31 AM, Nicolás Brailovsky < nicolasbra...@gmail.com> wrote: > Is the memory used by sqlite3_temp_directory freed by sqlite or should it > be freed by the user? > > From the documentation for sqlite3_temp_directory: > > ** the [temp_store_directory pragma] always assumes

[sqlite] Memory ownership for sqlite3_temp_directory

2014-07-23 Thread Nicolás Brailovsky
Is the memory used by sqlite3_temp_directory freed by sqlite or should it be freed by the user? From the documentation for sqlite3_temp_directory: ** the [temp_store_directory pragma] always assumes that any string ** that this variable points to is held in memory obtained from **