]> git.tdb.fi Git - libs/datafile.git/commitdiff
Fix a memory leak
authorMikko Rasa <tdb@tdb.fi>
Tue, 8 Jul 2008 15:23:07 +0000 (15:23 +0000)
committerMikko Rasa <tdb@tdb.fi>
Tue, 8 Jul 2008 15:23:07 +0000 (15:23 +0000)
source/writer.cpp
source/writer.h

index 0da77bc0304dc471f24a368399c86cfbcabff391..bfd0edac784227efa21b8f30b7dd72e5bcdc3325 100644 (file)
@@ -21,6 +21,11 @@ Writer::Writer(IO::Base &o):
        binary(false)
 { }
 
+Writer::~Writer()
+{
+       delete mode;
+}
+
 void Writer::write(const Statement &st)
 {
        mode->write(st);
index e62e8bce2851313d6a9cb10e4df86531920dbd4e..73471ac594b1f7ee7d523df3c9f2aa054cac5eb1 100644 (file)
@@ -30,6 +30,7 @@ private:
 
 public:
        Writer(IO::Base &o);
+       ~Writer();
 
        /**
        Writes a statement to the output.  This function always writes a complete