diff --git a/demboyz/base/jsonfile.cpp b/demboyz/base/jsonfile.cpp index a7a4b4b..442df5f 100644 --- a/demboyz/base/jsonfile.cpp +++ b/demboyz/base/jsonfile.cpp @@ -12,6 +12,11 @@ namespace base { } + JsonWriterFile::~JsonWriterFile() + { + Flush(); + } + FILE* JsonWriterFile::GetFp() const { return m_fp; diff --git a/demboyz/base/jsonfile.h b/demboyz/base/jsonfile.h index 5164bd9..10c9aca 100644 --- a/demboyz/base/jsonfile.h +++ b/demboyz/base/jsonfile.h @@ -13,6 +13,7 @@ namespace base { public: JsonWriterFile(FILE* fp, char* buffer, std::size_t length); + ~JsonWriterFile(); FILE* GetFp() const; void Flush();