SQLITE3_STR_FINISH(3) Library Functions Manual SQLITE3_STR_FINISH(3)

sqlite3_str_finish, sqlite3_str_free — finalize a dynamic string

#include <sqlite3.h>

char *
sqlite3_str_finish(sqlite3_str*);

void
sqlite3_str_free(sqlite3_str*);

The sqlite3_str_finish(X) interface destroys the sqlite3_str object X and returns a pointer to a memory buffer obtained from () that contains the constructed string. The calling application should pass the returned value to () to avoid a memory leak. The sqlite3_str_finish(X) interface may return a NULL pointer if any errors were encountered during construction of the string. The sqlite3_str_finish(X) interface might also return a NULL pointer if the string in sqlite3_str object X is zero bytes long.

The sqlite3_str_free(X) interface destroys both the sqlite3_str object X and the string content it contains. Calling sqlite3_str_free(X) is the equivalent of calling sqlite3_free(sqlite3_str_finish(X)).

These declarations were extracted from the interface documentation at line 8822.

SQLITE_API char *sqlite3_str_finish(sqlite3_str*);
SQLITE_API void sqlite3_str_free(sqlite3_str*);

sqlite3_malloc(3), sqlite3_str(3)

April 29, 2026 NetBSD 11.99