|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r72543 - trunk/boost/iostreams
From: dnljms_at_[hidden]
Date: 2011-06-11 10:20:42
Author: danieljames
Date: 2011-06-11 10:20:42 EDT (Sat, 11 Jun 2011)
New Revision: 72543
URL: http://svn.boost.org/trac/boost/changeset/72543
Log:
Iostreams: In chains, clean up properly when close throws in the destructor. Refs #4922.
Thanks to Victor Shugaev.
Text files modified:
trunk/boost/iostreams/chain.hpp | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
Modified: trunk/boost/iostreams/chain.hpp
==============================================================================
--- trunk/boost/iostreams/chain.hpp (original)
+++ trunk/boost/iostreams/chain.hpp 2011-06-11 10:20:42 EDT (Sat, 11 Jun 2011)
@@ -314,7 +314,11 @@
pback_size_(default_pback_buffer_size),
flags_(f_auto_close)
{ }
- ~chain_impl() { try { close(); reset(); } catch (...) { } }
+ ~chain_impl()
+ {
+ try { close(); } catch (...) { }
+ try { reset(); } catch (...) { }
+ }
void close()
{
if ((flags_ & f_open) != 0) {
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk