Skip to content

Commit

Permalink
Clean up indices after exiting
Browse files Browse the repository at this point in the history
  • Loading branch information
aristotaloss committed Feb 6, 2016
1 parent 57d8b68 commit 1785b2c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/file_system.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ FileSystem::~FileSystem() {
if (main_file) {
delete[] main_file;
}

// Clean up indices
for (auto &entry : indices) {
if (entry.second) // We don't see the fs descriptor as an index
delete entry.second;
}
}

void FileSystem::LoadDirectory(char *directory) {
Expand Down

0 comments on commit 1785b2c

Please sign in to comment.