summaryrefslogtreecommitdiffstats
path: root/libdimensionxx/cookie-tmpfile.cpp
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@gmail.com>2009-09-10 19:59:09 +0000
committerTavian Barnes <tavianator@gmail.com>2009-09-10 19:59:09 +0000
commit29de9f06dbfeae9006aa711d3aa2ef785e622eef (patch)
tree75e19f8f495364f14e688e0e63d12cd08ffb7a02 /libdimensionxx/cookie-tmpfile.cpp
parent080d202c75f0c0887d11daf5186ee51c1e82b6c3 (diff)
downloaddimension-29de9f06dbfeae9006aa711d3aa2ef785e622eef.tar.xz
FILE_Cookie fixes.
Diffstat (limited to 'libdimensionxx/cookie-tmpfile.cpp')
-rw-r--r--libdimensionxx/cookie-tmpfile.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/libdimensionxx/cookie-tmpfile.cpp b/libdimensionxx/cookie-tmpfile.cpp
index 9e513e6..784e984 100644
--- a/libdimensionxx/cookie-tmpfile.cpp
+++ b/libdimensionxx/cookie-tmpfile.cpp
@@ -25,8 +25,10 @@
namespace Dimension
{
- // Close the tmpfile
- FILE_Cookie::~FILE_Cookie() { std::fclose(m_file); }
+ // FILE_Cookie pure virtual destructor
+ FILE_Cookie::~FILE_Cookie() {
+ fclose(file());
+ }
namespace
{
@@ -110,6 +112,9 @@ namespace Dimension
file(tmp);
}
+ // No-op iFILE_Cookie destructor
+ iFILE_Cookie::~iFILE_Cookie() { }
+
// Make an output FILE_Cookie
oFILE_Cookie::oFILE_Cookie(std::ostream& ostr)
: m_ostr(&ostr)
@@ -146,4 +151,7 @@ namespace Dimension
// Set the FILE*
file(tmp);
}
+
+ // No-op ioFILE_Cookie destructor
+ ioFILE_Cookie::~ioFILE_Cookie() { }
}