Remove unnecessary memory handling.

It all gets cleaned up when the GitHandler object goes out of scope
anyway.
This commit is contained in:
Oliver Hamlet
2015-07-14 18:52:22 +01:00
parent 46469a23e8
commit 976aaa624a
2 changed files with 0 additions and 12 deletions
-8
View File
@@ -169,14 +169,6 @@ namespace loot {
payload.fileToFind = filename.c_str();
git.Call(git_diff_foreach(git.diff, &git.diff_file_cb, NULL, NULL, NULL, &payload));
// Clean up memory
git_object_free(git.obj);
git.obj = nullptr;
git_tree_free(git.tree);
git.tree = nullptr;
git_diff_free(git.diff);
git.diff = nullptr;
return payload.fileFound;
}
}
-4
View File
@@ -76,10 +76,6 @@ namespace loot {
out << boost::locale::as::ftime("%Y-%m-%d") << dateTime;
info.date = out.str();
// Free object memory.
git_object_free(git.obj);
git.obj = nullptr;
BOOST_LOG_TRIVIAL(trace) << "Diffing masterlist HEAD and working copy.";
if (IsFileDifferent(path.parent_path(), path.filename().string())) {
info.revision += string(" ") + lc::translate("(edited)").str();