
14 Mar
2011
14 Mar
'11
2:16 a.m.
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.