Empty the list when it gets destroyed

This commit is contained in:
Baptiste Wicht 2014-01-29 21:17:01 +01:00
parent ef5b61d199
commit cc37f73ba4

View File

@ -33,6 +33,12 @@ public:
//Nothing else to init
}
~list(){
while(!empty()){
pop_back();
}
}
// Disable copy for now
list(const list& rhs) = delete;
list& operator=(const list& rhs) = delete;