是否需要删除指针从sqlite3_column_blob()方法获取?

前端之家收集整理的这篇文章主要介绍了是否需要删除指针从sqlite3_column_blob()方法获取?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
像这样:const void * test = sqlite3_column_blob(stat,1);
我可以删除删除[]测试吗?

解决方法

sqllite documentation

The pointers returned are valid until a type conversion occurs or until sqlite3_step() or sqlite3_reset() or sqlite3_finalize() is called. The memory space used to hold strings and BLOBs is freed automatically. Do not pass the pointers returned by sqlite3_column_blob() into sqlite3_free().

猜你在找的Sqlite相关文章