Hi All,
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.
Ex: Here I am using malloc for sqlQuery allocation ,
sqlQuery = (KN_CHAR*)malloc(DB_QUERY_LEN);
if(NULL != sqlQuery)
{
snprintf(sqlQuery,KN_DB_QUERY_LEN,"update %s set %s='%d' where
%s='%s';",GT_TBL_NAME,GT_STATUS_PTR->colName,//
pGroupStatus,GT_ID_PTR->colName,pGroupId);
}
else
return MEMORY_ALLOCATION_FAILED;
if(KN_Sqlite_DB_ExecQueryInSequence(sqlQuery) != KN_SUCCESS){
free(sqlQuery);
return SQLITE_QUERY_FAILED;
}
free(sqlQuery);
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users