The function sqlite3_column_text returns const char*
Should I free the returned pointer or sqlite will free it?
The function sqlite3_column_text returns const char* Should I free the returned pointer or sqlite
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
sqllitewill free it. check here the quote fromsqlliteapi reference:The pointers returned are valid until a type conversion occurs as described above, or until
sqlite3_step()orsqlite3_reset()orsqlite3_finalize()is called. The memory space used to hold strings and BLOBs is freed automatically. Do not pass the pointers returnedsqlite3_column_blob(),sqlite3_column_text(), etc. intosqlite3_free().