mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
test: Fix IO sink destructors in the runner.
This commit is contained in:
parent
df27c64041
commit
9752ee8ed2
@ -53,6 +53,7 @@ struct Sink {
|
||||
virtual void outline( bool ) {}
|
||||
virtual void push( std::string x ) = 0;
|
||||
virtual void sync() {}
|
||||
virtual ~Sink() {}
|
||||
};
|
||||
|
||||
struct BufSink : Sink {
|
||||
@ -241,11 +242,14 @@ struct IO : Sink {
|
||||
return *this;
|
||||
}
|
||||
|
||||
~IO() {
|
||||
void clear() {
|
||||
for ( Sinks::iterator i = sinks.begin(); i != sinks.end(); ++i )
|
||||
delete *i;
|
||||
sinks.clear();
|
||||
}
|
||||
|
||||
~IO() { clear(); }
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user