From: Mikko Rasa Date: Tue, 8 Jul 2008 15:23:07 +0000 (+0000) Subject: Fix a memory leak X-Git-Tag: 1.0~5 X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=14d7dc66003ae52f8c4c25bf241b2a12264aacb2;p=libs%2Fdatafile.git Fix a memory leak --- diff --git a/source/writer.cpp b/source/writer.cpp index 0da77bc..bfd0eda 100644 --- a/source/writer.cpp +++ b/source/writer.cpp @@ -21,6 +21,11 @@ Writer::Writer(IO::Base &o): binary(false) { } +Writer::~Writer() +{ + delete mode; +} + void Writer::write(const Statement &st) { mode->write(st); diff --git a/source/writer.h b/source/writer.h index e62e8bc..73471ac 100644 --- a/source/writer.h +++ b/source/writer.h @@ -30,6 +30,7 @@ private: public: Writer(IO::Base &o); + ~Writer(); /** Writes a statement to the output. This function always writes a complete