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
** [sqlite3_malloc] and the pragma may attempt to free that memory
** using [sqlite3_free].

From this I understand that the memory ownership gets transferred to
sqlite, so the responsibility for clean up should be sqlite's (presumably
in the sqlite3_shutdown function). This doesn't seem to be the case, though.

1. Is the memory for sqlite3_temp_directory ever cleaned up?
2. If not, should it be?
3. Could the information about the memory ownership be added to the
documentation? I believe this would also apply to other extern-definitions
as well.

Cheers

Nicolás Brailovsky
- Tech blog http://monoinfinito.wordpress.com
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to