fixed memory leak
This commit is contained in:
parent
1fc2b3463a
commit
cc5bfec4e3
|
@ -46,7 +46,7 @@ int main(int argc, char **argv){
|
|||
{
|
||||
std::cout << "Loading movies" << std::endl;
|
||||
std::ifstream moviesfile;
|
||||
moviesfile.open("movies.txt");
|
||||
moviesfile.open("transaction.txt");
|
||||
std::string instruction;
|
||||
|
||||
while (std::getline(moviesfile, instruction))
|
||||
|
@ -62,7 +62,7 @@ int main(int argc, char **argv){
|
|||
fprintf(stderr, "SQL error: %s\n", zErrMsg);
|
||||
sqlite3_free(zErrMsg);
|
||||
}
|
||||
|
||||
delete(instructionchars);
|
||||
}
|
||||
std::cout << "Done" << std::endl;
|
||||
}
|
||||
|
@ -76,6 +76,7 @@ int main(int argc, char **argv){
|
|||
fprintf(stderr, "SQL error: %s\n", zErrMsg);
|
||||
sqlite3_free(zErrMsg);
|
||||
}
|
||||
delete(inputchars);
|
||||
}
|
||||
}
|
||||
sqlite3_close(db);
|
||||
|
|
Loading…
Reference in New Issue