$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [Boost-users] Preventing iostreams from accessing freed memory
From: Adam Nielsen (a.nielsen_at_[hidden])
Date: 2011-03-13 22:16:24
> So is there any way I can prevent a filtering_stream from performing I/O in
> its destructor?
Just for the record I think I found a solution. If I create my own class
inheriting from filtering_stream and in its destructor call this->reset(), and
only create instances of this class instead, then it flushes/closes everything
on destruct (while all the streams are valid) instead of after it (when the
streams have been freed.)
So far this has stopped all the segfaults!
Cheers,
Adam.