We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
if you run the example app code with address sanatizer it shows that it leaks memory.
==451983==ERROR: LeakSanitizer: detected memory leaks Direct leak of 256 byte(s) in 1 object(s) allocated from: #0 0x7fdb7d4f8f27 in operator new(unsigned long) ../../../../src/libsanitizer/asan/asan_new_delete.cpp:99 #1 0x7fdb7d3bbdd0 in sql::mariadb::SelectResultSet::create(sql::mariadb::Results*, sql::mariadb::Protocol*, sql::mariadb::capi::st_mysql*, bool) /home/buildbot/src/src/SelectResultSet.cpp:79
The issue is the result sets, eg this:
sql::ResultSet *res = stmnt->executeQuery("select * from tasks");
needs to be wrapped in a unique_ptr to ensure it gets cleaned up at end of scope:
unique_ptr
std::unique_ptr<sql::ResultSet> res(stmnt->executeQuery("select * from tasks"));
This applies to every result_set in the example app. ie every time stmnt->execute*() is called
stmnt->execute*()
The text was updated successfully, but these errors were encountered:
rhedgpeth
No branches or pull requests
if you run the example app code with address sanatizer it shows that it leaks memory.
The issue is the result sets, eg this:
needs to be wrapped in a
unique_ptr
to ensure it gets cleaned up at end of scope:This applies to every result_set in the example app. ie every time
stmnt->execute*()
is calledThe text was updated successfully, but these errors were encountered: