Added a virtual destructor for SpeciesThermoInterpType.h. Without it,
there is a memory leak.
This commit is contained in:
parent
e050c6fc10
commit
19a1824d08
3 changed files with 5 additions and 3 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,6 +19,9 @@ namespace Cantera {
|
|||
|
||||
public:
|
||||
|
||||
SpeciesThermoInterpType() {};
|
||||
virtual ~SpeciesThermoInterpType() {};
|
||||
|
||||
virtual SpeciesThermoInterpType *
|
||||
duplMyselfAsSpeciesThermoInterpType() const = 0;
|
||||
|
||||
|
|
|
|||
|
|
@ -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 ------------------------
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue