Skip to content

Commit

Permalink
re-added close on destruction; non-copyable
Browse files Browse the repository at this point in the history
  • Loading branch information
jermp committed May 6, 2021
1 parent d08e850 commit 41ca01b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions include/mm_file/mm_file.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@ struct file {
init();
}

~file() {
close();
}

file(file const&) = delete; // non construction-copyable
file& operator=(file const&) = delete; // non copyable

bool is_open() const {
return m_fd != -1;
}
Expand Down

0 comments on commit 41ca01b

Please sign in to comment.