Skip to content

Commit 41ca01b

Browse files
committed
re-added close on destruction; non-copyable
1 parent d08e850 commit 41ca01b

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

include/mm_file/mm_file.hpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,13 @@ struct file {
2121
init();
2222
}
2323

24+
~file() {
25+
close();
26+
}
27+
28+
file(file const&) = delete; // non construction-copyable
29+
file& operator=(file const&) = delete; // non copyable
30+
2431
bool is_open() const {
2532
return m_fd != -1;
2633
}

0 commit comments

Comments
 (0)