1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-22 17:35:59 +03:00

test: Fix IO sink destructors in the runner.

This commit is contained in:
Petr Rockai 2014-06-27 00:54:56 +02:00
parent df27c64041
commit 9752ee8ed2

View File

@ -53,6 +53,7 @@ struct Sink {
virtual void outline( bool ) {} virtual void outline( bool ) {}
virtual void push( std::string x ) = 0; virtual void push( std::string x ) = 0;
virtual void sync() {} virtual void sync() {}
virtual ~Sink() {}
}; };
struct BufSink : Sink { struct BufSink : Sink {
@ -241,11 +242,14 @@ struct IO : Sink {
return *this; return *this;
} }
~IO() { void clear() {
for ( Sinks::iterator i = sinks.begin(); i != sinks.end(); ++i ) for ( Sinks::iterator i = sinks.begin(); i != sinks.end(); ++i )
delete *i; delete *i;
sinks.clear();
} }
~IO() { clear(); }
}; };
#endif #endif