Added a virtual destructor for SpeciesThermoInterpType.h. Without it,

there is a memory leak.
This commit is contained in:
Harry Moffat 2005-10-28 23:16:25 +00:00
parent e050c6fc10
commit 19a1824d08
3 changed files with 5 additions and 3 deletions

View file

@ -55,7 +55,7 @@ namespace Cantera {
for (int k = 0; k < m_kk; k++) {
SpeciesThermoInterpType *sp = m_sp[k];
if (sp) {
delete (sp);
delete sp;
m_sp[k] = 0;
}
}

View file

@ -19,6 +19,9 @@ namespace Cantera {
public:
SpeciesThermoInterpType() {};
virtual ~SpeciesThermoInterpType() {};
virtual SpeciesThermoInterpType *
duplMyselfAsSpeciesThermoInterpType() const = 0;

View file

@ -331,7 +331,7 @@ namespace Cantera {
er[0] = m_s0_R[0];
}
/**
/**
* Get the nondimensional Gibbs functions for the standard
* state of the species at the current T and reference pressure
* for the species.
@ -341,7 +341,6 @@ namespace Cantera {
cpr[0] = m_cp0_R[0];
}
/*
* ------------------ Setting the State ------------------------
*/