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,8 +76,9 @@ int main(int argc, char **argv){
|
|||
fprintf(stderr, "SQL error: %s\n", zErrMsg);
|
||||
sqlite3_free(zErrMsg);
|
||||
}
|
||||
delete(inputchars);
|
||||
}
|
||||
}
|
||||
sqlite3_close(db);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue