diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/output.cpp | 5 | ||||
-rw-r--r-- | src/output.hpp | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/src/output.cpp b/src/output.cpp index d14b1b9..cc9d5f3 100644 --- a/src/output.cpp +++ b/src/output.cpp @@ -58,6 +58,11 @@ output_t::output_t(const generator_t *generator0, const char *header, const char } } +output_t::~output_t() { + std::fclose(header_file); + std::fclose(source_file); +} + void output_t::emit_tokens() { if (tokens.empty()) return; diff --git a/src/output.hpp b/src/output.hpp index 913f123..e3d5b99 100644 --- a/src/output.hpp +++ b/src/output.hpp @@ -74,6 +74,7 @@ private: public: output_t(const generator_t *generator0, const char *header, const char *source); + ~output_t(); void write(); }; |