Commit 68f1b1ef authored by Guillaume Baulieu's avatar Guillaume Baulieu
Browse files

Add a destructor to the ConfReader class

parent 28d1274a
......@@ -234,6 +234,17 @@ public:
defaultRequired = -1; // by default, all parameters of a command must be given
smartDefaults = inf; // single-bool keywords default to true unless they start with No/Dont
}
~ConfReader(){
for(unsigned int i=0;i<vcom.size();++i){
for(unsigned int j=0;j<vcom[i]->saved.size();++j){
delete [] vcom[i]->saved[j];
}
for(unsigned int j=0;j<vcom[i]->vpar.size();++j){
delete vcom[i]->vpar[j];
}
delete vcom[i];
}
}
int Size() const {return int(vcom.size());}
int Find(const std::string& name) const;
void Show(const std::string& className = "") const;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment