On 7/19/2013 1:50 PM, Ashok Pitambar wrote:
I am using SQLite in my application, Is sqlite mandates or is
it necessary
to use Sqlite provided memory allocation(sqlit3_malloc()) functions instead
for native allocators(malloc())in applications? If yes why it is necessary?
Is there any harm for not using them.
No, SQLite doesn't mandate it. It is not necessary. There is no harm in
using any memory allocator of your choice.
Sometimes, SQLite itself allocates memory which you are responsible for
deallocating. In these cases, the documentation specifies exactly how to
do so. For example, sqlite3_mprintf returns a pointer to memory
allocated with sqlite3_malloc, which the caller should eventually
deallocate with sqlite3_free. sqlite3_get_table allocates memory for the
resulting table, which the caller should deallocate with sqlite3_free_table.
--
Igor Tandetnik
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users