]> git.tdb.fi Git - libs/datafile.git/blobdiff - source/writer.h
Fix a memory leak
[libs/datafile.git] / source / writer.h
index 698bade8f650cf45198ee92ac147f18a10540b02..73471ac594b1f7ee7d523df3c9f2aa054cac5eb1 100644 (file)
@@ -9,7 +9,7 @@ Distributed under the LGPL
 #define MSP_DATAFILE_WRITER_H_
 
 #include <map>
-#include <ostream>
+#include <msp/io/base.h>
 #include "binarydict.h"
 
 namespace Msp {
@@ -24,12 +24,13 @@ Frontend for writing data.
 class Writer
 {
 private:
-       std::ostream &out;
+       IO::Base &out;
        WriterMode *mode;
        bool binary;
 
 public:
-       Writer(std::ostream &o);
+       Writer(IO::Base &o);
+       ~Writer();
 
        /**
        Writes a statement to the output.  This function always writes a complete