Removed unnecessary checks surrounding delete operations
This commit is contained in:
parent
4e3a79394b
commit
6d6e237f07
23 changed files with 49 additions and 147 deletions
|
|
@ -668,9 +668,7 @@ void deepStdVectorPointerCopy(const std::vector<D*> &fromVec, std::vector<D*> &t
|
||||||
{
|
{
|
||||||
size_t is = toVec.size();
|
size_t is = toVec.size();
|
||||||
for (size_t i = 0; i < is; is++) {
|
for (size_t i = 0; i < is; is++) {
|
||||||
if (toVec[i]) {
|
delete toVec[i];
|
||||||
delete(toVec[i]);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
is = fromVec.size();
|
is = fromVec.size();
|
||||||
toVec.resize(is);
|
toVec.resize(is);
|
||||||
|
|
|
||||||
|
|
@ -82,17 +82,13 @@ extern "C" {
|
||||||
string fin = string(file, lenfile);
|
string fin = string(file, lenfile);
|
||||||
string fth = string(id, lenid);
|
string fth = string(id, lenid);
|
||||||
trmodel = string(transport, lentr);
|
trmodel = string(transport, lentr);
|
||||||
if (_gas) {
|
delete _gas;
|
||||||
delete _gas;
|
|
||||||
}
|
|
||||||
_gas = new IdealGasMix(fin, fth);
|
_gas = new IdealGasMix(fin, fth);
|
||||||
} catch (CanteraError& err) {
|
} catch (CanteraError& err) {
|
||||||
handleError(err);
|
handleError(err);
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
if (_trans) {
|
delete _trans;
|
||||||
delete _trans;
|
|
||||||
}
|
|
||||||
_trans = newTransportMgr(trmodel,_gas,1);
|
_trans = newTransportMgr(trmodel,_gas,1);
|
||||||
} catch (CanteraError& err) {
|
} catch (CanteraError& err) {
|
||||||
_trans = newTransportMgr("",_gas,1);
|
_trans = newTransportMgr("",_gas,1);
|
||||||
|
|
|
||||||
|
|
@ -842,9 +842,7 @@ doublereal MultiPhase::equilibrate(int XY, doublereal err,
|
||||||
addLogEntry("max T",fp2str(Thigh));
|
addLogEntry("max T",fp2str(Thigh));
|
||||||
}
|
}
|
||||||
for (n = 0; n < maxiter; n++) {
|
for (n = 0; n < maxiter; n++) {
|
||||||
if (e) {
|
delete e;
|
||||||
delete e;
|
|
||||||
}
|
|
||||||
e = new MultiPhaseEquil(this, strt);
|
e = new MultiPhaseEquil(this, strt);
|
||||||
if (loglevel > 0) {
|
if (loglevel > 0) {
|
||||||
beginLogGroup("iteration "+int2str(n));
|
beginLogGroup("iteration "+int2str(n));
|
||||||
|
|
|
||||||
|
|
@ -552,9 +552,7 @@ int VCS_SOLVE::vcs_prob_specifyFully(const VCS_PROB* pub)
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
for (size_t kspec = 0; kspec < nspecies; kspec++) {
|
for (size_t kspec = 0; kspec < nspecies; kspec++) {
|
||||||
if (m_speciesThermoList[kspec] != NULL) {
|
delete m_speciesThermoList[kspec];
|
||||||
delete m_speciesThermoList[kspec];
|
|
||||||
}
|
|
||||||
VCS_SPECIES_THERMO* spf = pub->SpeciesThermo[kspec];
|
VCS_SPECIES_THERMO* spf = pub->SpeciesThermo[kspec];
|
||||||
m_speciesThermoList[kspec] = spf->duplMyselfAsVCS_SPECIES_THERMO();
|
m_speciesThermoList[kspec] = spf->duplMyselfAsVCS_SPECIES_THERMO();
|
||||||
if (m_speciesThermoList[kspec] == NULL) {
|
if (m_speciesThermoList[kspec] == NULL) {
|
||||||
|
|
|
||||||
|
|
@ -114,12 +114,8 @@ int ImplicitSurfChem::checkMatch(std::vector<ThermoPhase*> m_vec, ThermoPhase* t
|
||||||
*/
|
*/
|
||||||
ImplicitSurfChem::~ImplicitSurfChem()
|
ImplicitSurfChem::~ImplicitSurfChem()
|
||||||
{
|
{
|
||||||
if (m_integ) {
|
delete m_integ;
|
||||||
delete m_integ;
|
delete m_surfSolver;
|
||||||
}
|
|
||||||
if (m_surfSolver) {
|
|
||||||
delete m_surfSolver;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// overloaded method of FuncEval. Called by the integrator to
|
// overloaded method of FuncEval. Called by the integrator to
|
||||||
|
|
|
||||||
|
|
@ -67,9 +67,7 @@ InterfaceKinetics::InterfaceKinetics(thermo_t* thermo) :
|
||||||
*/
|
*/
|
||||||
InterfaceKinetics::~InterfaceKinetics()
|
InterfaceKinetics::~InterfaceKinetics()
|
||||||
{
|
{
|
||||||
if (m_integrator) {
|
delete m_integrator;
|
||||||
delete m_integrator;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
//====================================================================================================================
|
//====================================================================================================================
|
||||||
// Copy Constructor for the %InterfaceKinetics object.
|
// Copy Constructor for the %InterfaceKinetics object.
|
||||||
|
|
|
||||||
|
|
@ -309,12 +309,8 @@ NonlinearSolver::NonlinearSolver(const NonlinearSolver& right) :
|
||||||
//====================================================================================================================
|
//====================================================================================================================
|
||||||
NonlinearSolver::~NonlinearSolver()
|
NonlinearSolver::~NonlinearSolver()
|
||||||
{
|
{
|
||||||
if (jacCopyPtr_) {
|
delete jacCopyPtr_;
|
||||||
delete jacCopyPtr_;
|
delete HessianPtr_;
|
||||||
}
|
|
||||||
if (HessianPtr_) {
|
|
||||||
delete HessianPtr_;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
//====================================================================================================================
|
//====================================================================================================================
|
||||||
NonlinearSolver& NonlinearSolver::operator=(const NonlinearSolver& right)
|
NonlinearSolver& NonlinearSolver::operator=(const NonlinearSolver& right)
|
||||||
|
|
@ -378,13 +374,9 @@ NonlinearSolver& NonlinearSolver::operator=(const NonlinearSolver& right)
|
||||||
m_print_flag = right.m_print_flag;
|
m_print_flag = right.m_print_flag;
|
||||||
m_ScaleSolnNormToResNorm = right.m_ScaleSolnNormToResNorm;
|
m_ScaleSolnNormToResNorm = right.m_ScaleSolnNormToResNorm;
|
||||||
|
|
||||||
if (jacCopyPtr_) {
|
delete jacCopyPtr_;
|
||||||
delete(jacCopyPtr_);
|
|
||||||
}
|
|
||||||
jacCopyPtr_ = (right.jacCopyPtr_)->duplMyselfAsGeneralMatrix();
|
jacCopyPtr_ = (right.jacCopyPtr_)->duplMyselfAsGeneralMatrix();
|
||||||
if (HessianPtr_) {
|
delete HessianPtr_;
|
||||||
delete(HessianPtr_);
|
|
||||||
}
|
|
||||||
HessianPtr_ = (right.HessianPtr_)->duplMyselfAsGeneralMatrix();
|
HessianPtr_ = (right.HessianPtr_)->duplMyselfAsGeneralMatrix();
|
||||||
|
|
||||||
deltaX_CP_ = right.deltaX_CP_;
|
deltaX_CP_ = right.deltaX_CP_;
|
||||||
|
|
@ -3067,9 +3059,7 @@ int NonlinearSolver::solve_nonlinear_problem(int SolnType, doublereal* const y_c
|
||||||
int retnCode = 0;
|
int retnCode = 0;
|
||||||
bool forceNewJac = false;
|
bool forceNewJac = false;
|
||||||
|
|
||||||
if (jacCopyPtr_) {
|
delete jacCopyPtr_;
|
||||||
delete jacCopyPtr_;
|
|
||||||
}
|
|
||||||
jacCopyPtr_ = jac.duplMyselfAsGeneralMatrix();
|
jacCopyPtr_ = jac.duplMyselfAsGeneralMatrix();
|
||||||
|
|
||||||
doublereal stepNorm_1;
|
doublereal stepNorm_1;
|
||||||
|
|
|
||||||
|
|
@ -862,9 +862,7 @@ initThermoXML(XML_Node& phaseNode, const std::string& id_)
|
||||||
* the internal eos water calculator.
|
* the internal eos water calculator.
|
||||||
*/
|
*/
|
||||||
if (m_form_A_Debye == A_DEBYE_WATER) {
|
if (m_form_A_Debye == A_DEBYE_WATER) {
|
||||||
if (m_waterProps) {
|
delete m_waterProps;
|
||||||
delete m_waterProps;
|
|
||||||
}
|
|
||||||
m_waterProps = new WaterProps(m_waterSS);
|
m_waterProps = new WaterProps(m_waterSS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -141,9 +141,7 @@ operator=(const IonsFromNeutralVPSSTP& b)
|
||||||
*/
|
*/
|
||||||
if (IOwnNThermoPhase_) {
|
if (IOwnNThermoPhase_) {
|
||||||
if (b.neutralMoleculePhase_) {
|
if (b.neutralMoleculePhase_) {
|
||||||
if (neutralMoleculePhase_) {
|
delete neutralMoleculePhase_;
|
||||||
delete neutralMoleculePhase_;
|
|
||||||
}
|
|
||||||
neutralMoleculePhase_ = (b.neutralMoleculePhase_)->duplMyselfAsThermoPhase();
|
neutralMoleculePhase_ = (b.neutralMoleculePhase_)->duplMyselfAsThermoPhase();
|
||||||
} else {
|
} else {
|
||||||
neutralMoleculePhase_ = 0;
|
neutralMoleculePhase_ = 0;
|
||||||
|
|
|
||||||
|
|
@ -90,9 +90,7 @@ MetalSHEelectrons::MetalSHEelectrons(const MetalSHEelectrons& right) :
|
||||||
|
|
||||||
MetalSHEelectrons::~MetalSHEelectrons()
|
MetalSHEelectrons::~MetalSHEelectrons()
|
||||||
{
|
{
|
||||||
if (xdef_) {
|
delete xdef_;
|
||||||
delete xdef_;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
MetalSHEelectrons&
|
MetalSHEelectrons&
|
||||||
|
|
@ -102,9 +100,7 @@ MetalSHEelectrons::operator=(const MetalSHEelectrons& right)
|
||||||
SingleSpeciesTP::operator=(right);
|
SingleSpeciesTP::operator=(right);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (xdef_) {
|
delete xdef_;
|
||||||
delete xdef_;
|
|
||||||
}
|
|
||||||
xdef_ = new XML_Node(*right.xdef_);
|
xdef_ = new XML_Node(*right.xdef_);
|
||||||
|
|
||||||
return *this;
|
return *this;
|
||||||
|
|
|
||||||
|
|
@ -172,9 +172,7 @@ PDSS_HKFT& PDSS_HKFT::operator=(const PDSS_HKFT& b)
|
||||||
m_waterSS = 0;
|
m_waterSS = 0;
|
||||||
m_densWaterSS = b.m_densWaterSS;
|
m_densWaterSS = b.m_densWaterSS;
|
||||||
//! Need to call initAllPtrs AFTER, to get the correct m_waterProps
|
//! Need to call initAllPtrs AFTER, to get the correct m_waterProps
|
||||||
if (m_waterProps) {
|
delete m_waterProps;
|
||||||
delete m_waterProps;
|
|
||||||
}
|
|
||||||
m_waterProps = 0;
|
m_waterProps = 0;
|
||||||
m_born_coeff_j = b.m_born_coeff_j;
|
m_born_coeff_j = b.m_born_coeff_j;
|
||||||
m_r_e_j = b.m_r_e_j;
|
m_r_e_j = b.m_r_e_j;
|
||||||
|
|
@ -642,9 +640,7 @@ void PDSS_HKFT::initAllPtrs(VPStandardStateTP* vptp_ptr, VPSSMgr* vpssmgr_ptr,
|
||||||
|
|
||||||
PDSS::initAllPtrs(vptp_ptr, vpssmgr_ptr, spthermo_ptr);
|
PDSS::initAllPtrs(vptp_ptr, vpssmgr_ptr, spthermo_ptr);
|
||||||
m_waterSS = (PDSS_Water*) m_tp->providePDSS(0);
|
m_waterSS = (PDSS_Water*) m_tp->providePDSS(0);
|
||||||
if (m_waterProps) {
|
delete m_waterProps;
|
||||||
delete m_waterProps;
|
|
||||||
}
|
|
||||||
m_waterProps = new WaterProps(m_waterSS);
|
m_waterProps = new WaterProps(m_waterSS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -251,9 +251,7 @@ void PDSS_Water::constructPDSSFile(VPStandardStateTP* tp, int spindex,
|
||||||
|
|
||||||
void PDSS_Water::constructSet()
|
void PDSS_Water::constructSet()
|
||||||
{
|
{
|
||||||
if (m_sub) {
|
delete m_sub;
|
||||||
delete m_sub;
|
|
||||||
}
|
|
||||||
m_sub = new WaterPropsIAPWS();
|
m_sub = new WaterPropsIAPWS();
|
||||||
if (m_sub == 0) {
|
if (m_sub == 0) {
|
||||||
throw CanteraError("PDSS_Water::initThermo",
|
throw CanteraError("PDSS_Water::initThermo",
|
||||||
|
|
|
||||||
|
|
@ -45,9 +45,7 @@ PureFluidPhase& PureFluidPhase::operator=(const PureFluidPhase& right)
|
||||||
{
|
{
|
||||||
if (&right != this) {
|
if (&right != this) {
|
||||||
ThermoPhase::operator=(right);
|
ThermoPhase::operator=(right);
|
||||||
if (m_sub) {
|
delete m_sub;
|
||||||
delete m_sub;
|
|
||||||
}
|
|
||||||
m_subflag = right.m_subflag;
|
m_subflag = right.m_subflag;
|
||||||
m_sub = tpx::GetSub(m_subflag);
|
m_sub = tpx::GetSub(m_subflag);
|
||||||
m_mw = right.m_mw;
|
m_mw = right.m_mw;
|
||||||
|
|
@ -69,9 +67,7 @@ PureFluidPhase::~PureFluidPhase()
|
||||||
void PureFluidPhase::
|
void PureFluidPhase::
|
||||||
initThermo()
|
initThermo()
|
||||||
{
|
{
|
||||||
if (m_sub) {
|
delete m_sub;
|
||||||
delete m_sub;
|
|
||||||
}
|
|
||||||
m_sub = tpx::GetSub(m_subflag);
|
m_sub = tpx::GetSub(m_subflag);
|
||||||
if (m_sub == 0) {
|
if (m_sub == 0) {
|
||||||
throw CanteraError("PureFluidPhase::initThermo",
|
throw CanteraError("PureFluidPhase::initThermo",
|
||||||
|
|
|
||||||
|
|
@ -488,12 +488,8 @@ public:
|
||||||
std::copy(b.m_coeff.begin(),
|
std::copy(b.m_coeff.begin(),
|
||||||
b.m_coeff.begin() + 15,
|
b.m_coeff.begin() + 15,
|
||||||
m_coeff.begin());
|
m_coeff.begin());
|
||||||
if (msp_low) {
|
delete msp_low;
|
||||||
delete msp_low;
|
delete msp_high;
|
||||||
}
|
|
||||||
if (msp_high) {
|
|
||||||
delete msp_high;
|
|
||||||
}
|
|
||||||
msp_low = new ShomatePoly(m_index, m_lowT, m_midT,
|
msp_low = new ShomatePoly(m_index, m_lowT, m_midT,
|
||||||
m_Pref, &m_coeff[1]);
|
m_Pref, &m_coeff[1]);
|
||||||
msp_high = new ShomatePoly(m_index, m_midT, m_highT,
|
msp_high = new ShomatePoly(m_index, m_midT, m_highT,
|
||||||
|
|
|
||||||
|
|
@ -77,9 +77,7 @@ operator=(const ThermoPhase& right)
|
||||||
m_speciesData[k] = 0;
|
m_speciesData[k] = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (m_spthermo) {
|
delete m_spthermo;
|
||||||
delete m_spthermo;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Call the base class assignment operator
|
* Call the base class assignment operator
|
||||||
|
|
|
||||||
|
|
@ -277,9 +277,7 @@ VPSSMgr_Water_ConstVol::createInstallPDSS(size_t k, const XML_Node& speciesNode,
|
||||||
throw CanteraError("VPSSMgr_Water_ConstVol::installSpecies",
|
throw CanteraError("VPSSMgr_Water_ConstVol::installSpecies",
|
||||||
"wrong SS mode: " + model);
|
"wrong SS mode: " + model);
|
||||||
}
|
}
|
||||||
if (m_waterSS) {
|
delete m_waterSS;
|
||||||
delete m_waterSS;
|
|
||||||
}
|
|
||||||
m_waterSS = new PDSS_Water(m_vptp_ptr, 0);
|
m_waterSS = new PDSS_Water(m_vptp_ptr, 0);
|
||||||
GeneralSpeciesThermo* genSpthermo = dynamic_cast<GeneralSpeciesThermo*>(m_spthermo);
|
GeneralSpeciesThermo* genSpthermo = dynamic_cast<GeneralSpeciesThermo*>(m_spthermo);
|
||||||
if (!genSpthermo) {
|
if (!genSpthermo) {
|
||||||
|
|
|
||||||
|
|
@ -273,9 +273,7 @@ VPSSMgr_Water_HKFT::createInstallPDSS(size_t k, const XML_Node& speciesNode,
|
||||||
"wrong SS mode: " + model);
|
"wrong SS mode: " + model);
|
||||||
}
|
}
|
||||||
//VPSSMgr::installSTSpecies(k, speciesNode, phaseNode_ptr);
|
//VPSSMgr::installSTSpecies(k, speciesNode, phaseNode_ptr);
|
||||||
if (m_waterSS) {
|
delete m_waterSS;
|
||||||
delete m_waterSS;
|
|
||||||
}
|
|
||||||
m_waterSS = new PDSS_Water(m_vptp_ptr, 0);
|
m_waterSS = new PDSS_Water(m_vptp_ptr, 0);
|
||||||
|
|
||||||
GeneralSpeciesThermo* genSpthermo = dynamic_cast<GeneralSpeciesThermo*>(m_spthermo);
|
GeneralSpeciesThermo* genSpthermo = dynamic_cast<GeneralSpeciesThermo*>(m_spthermo);
|
||||||
|
|
|
||||||
|
|
@ -345,9 +345,7 @@ VPStandardStateTP::createInstallPDSS(size_t k, const XML_Node& s,
|
||||||
if (m_PDSS_storage.size() < k+1) {
|
if (m_PDSS_storage.size() < k+1) {
|
||||||
m_PDSS_storage.resize(k+1,0);
|
m_PDSS_storage.resize(k+1,0);
|
||||||
}
|
}
|
||||||
if (m_PDSS_storage[k] != 0) {
|
delete m_PDSS_storage[k];
|
||||||
delete m_PDSS_storage[k] ;
|
|
||||||
}
|
|
||||||
m_PDSS_storage[k] = m_VPSS_ptr->createInstallPDSS(k, s, phaseNode_ptr);
|
m_PDSS_storage[k] = m_VPSS_ptr->createInstallPDSS(k, s, phaseNode_ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -123,9 +123,7 @@ initThermoXML(XML_Node& phaseNode, const std::string& id)
|
||||||
* Do initializations that don't depend on knowing the XML file
|
* Do initializations that don't depend on knowing the XML file
|
||||||
*/
|
*/
|
||||||
initThermo();
|
initThermo();
|
||||||
if (m_sub) {
|
delete m_sub;
|
||||||
delete m_sub;
|
|
||||||
}
|
|
||||||
m_sub = new WaterPropsIAPWS();
|
m_sub = new WaterPropsIAPWS();
|
||||||
if (m_sub == 0) {
|
if (m_sub == 0) {
|
||||||
throw CanteraError("WaterSSTP::initThermo",
|
throw CanteraError("WaterSSTP::initThermo",
|
||||||
|
|
|
||||||
|
|
@ -94,9 +94,7 @@ DustyGasTransport& DustyGasTransport::operator=(const DustyGasTransport& right)
|
||||||
|
|
||||||
// Warning -> gastran may not point to the correct object
|
// Warning -> gastran may not point to the correct object
|
||||||
// after this copy. The routine initialize() must be called
|
// after this copy. The routine initialize() must be called
|
||||||
if (m_gastran) {
|
delete m_gastran;
|
||||||
delete m_gastran;
|
|
||||||
}
|
|
||||||
m_gastran = right.duplMyselfAsTransport();
|
m_gastran = right.duplMyselfAsTransport();
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -196,9 +194,7 @@ void DustyGasTransport::initialize(ThermoPhase* phase, Transport* gastr)
|
||||||
m_thermo = phase;
|
m_thermo = phase;
|
||||||
m_nsp = m_thermo->nSpecies();
|
m_nsp = m_thermo->nSpecies();
|
||||||
if (m_gastran != gastr) {
|
if (m_gastran != gastr) {
|
||||||
if (m_gastran) {
|
delete m_gastran;
|
||||||
delete m_gastran;
|
|
||||||
}
|
|
||||||
m_gastran = gastr;
|
m_gastran = gastr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -57,27 +57,19 @@ LiquidTranInteraction::~LiquidTranInteraction()
|
||||||
{
|
{
|
||||||
size_t kmax = m_Aij.size();
|
size_t kmax = m_Aij.size();
|
||||||
for (size_t k = 0; k < kmax; k++) {
|
for (size_t k = 0; k < kmax; k++) {
|
||||||
if (m_Aij[k]) {
|
delete m_Aij[k];
|
||||||
delete m_Aij[k];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
kmax = m_Bij.size();
|
kmax = m_Bij.size();
|
||||||
for (size_t k = 0; k < kmax; k++) {
|
for (size_t k = 0; k < kmax; k++) {
|
||||||
if (m_Bij[k]) {
|
delete m_Bij[k];
|
||||||
delete m_Bij[k];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
kmax = m_Hij.size();
|
kmax = m_Hij.size();
|
||||||
for (size_t k = 0; k < kmax; k++) {
|
for (size_t k = 0; k < kmax; k++) {
|
||||||
if (m_Hij[k]) {
|
delete m_Hij[k];
|
||||||
delete m_Hij[k];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
kmax = m_Sij.size();
|
kmax = m_Sij.size();
|
||||||
for (size_t k = 0; k < kmax; k++) {
|
for (size_t k = 0; k < kmax; k++) {
|
||||||
if (m_Sij[k]) {
|
delete m_Sij[k];
|
||||||
delete m_Sij[k];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -205,55 +205,29 @@ LiquidTransport::~LiquidTransport()
|
||||||
|
|
||||||
//These are constructed in TransportFactory::newLTP
|
//These are constructed in TransportFactory::newLTP
|
||||||
for (size_t k = 0; k < m_nsp; k++) {
|
for (size_t k = 0; k < m_nsp; k++) {
|
||||||
if (m_viscTempDep_Ns[k]) {
|
delete m_viscTempDep_Ns[k];
|
||||||
delete m_viscTempDep_Ns[k];
|
delete m_ionCondTempDep_Ns[k];
|
||||||
}
|
|
||||||
if (m_ionCondTempDep_Ns[k]) {
|
|
||||||
delete m_ionCondTempDep_Ns[k];
|
|
||||||
}
|
|
||||||
for (size_t l = 0; l < m_nsp; l++) {
|
for (size_t l = 0; l < m_nsp; l++) {
|
||||||
if (m_selfDiffTempDep_Ns[l][k]) {
|
delete m_selfDiffTempDep_Ns[l][k];
|
||||||
delete m_selfDiffTempDep_Ns[l][k];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
for (size_t l=0; l < m_nsp2; l++) {
|
for (size_t l=0; l < m_nsp2; l++) {
|
||||||
if (m_mobRatTempDep_Ns[l][k]) {
|
delete m_mobRatTempDep_Ns[l][k];
|
||||||
delete m_mobRatTempDep_Ns[l][k];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (m_lambdaTempDep_Ns[k]) {
|
|
||||||
delete m_lambdaTempDep_Ns[k];
|
|
||||||
}
|
|
||||||
if (m_radiusTempDep_Ns[k]) {
|
|
||||||
delete m_radiusTempDep_Ns[k];
|
|
||||||
}
|
|
||||||
if (m_diffTempDep_Ns[k]) {
|
|
||||||
delete m_diffTempDep_Ns[k];
|
|
||||||
}
|
}
|
||||||
|
delete m_lambdaTempDep_Ns[k];
|
||||||
|
delete m_radiusTempDep_Ns[k];
|
||||||
|
delete m_diffTempDep_Ns[k];
|
||||||
//These are constructed in TransportFactory::newLTI
|
//These are constructed in TransportFactory::newLTI
|
||||||
if (m_selfDiffMixModel[k]) {
|
delete m_selfDiffMixModel[k];
|
||||||
delete m_selfDiffMixModel[k];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for (size_t k = 0; k < m_nsp2; k++) {
|
for (size_t k = 0; k < m_nsp2; k++) {
|
||||||
if (m_mobRatMixModel[k]) {
|
delete m_mobRatMixModel[k];
|
||||||
delete m_mobRatMixModel[k];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_viscMixModel) {
|
delete m_viscMixModel;
|
||||||
delete m_viscMixModel;
|
delete m_ionCondMixModel;
|
||||||
}
|
delete m_lambdaMixModel;
|
||||||
if (m_ionCondMixModel) {
|
delete m_diffMixModel;
|
||||||
delete m_ionCondMixModel;
|
|
||||||
}
|
|
||||||
if (m_lambdaMixModel) {
|
|
||||||
delete m_lambdaMixModel;
|
|
||||||
}
|
|
||||||
if (m_diffMixModel) {
|
|
||||||
delete m_diffMixModel;
|
|
||||||
}
|
|
||||||
//if ( m_radiusMixModel ) delete m_radiusMixModel;
|
//if ( m_radiusMixModel ) delete m_radiusMixModel;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -75,9 +75,7 @@ int main(int argc, char** argv)
|
||||||
|
|
||||||
} catch (CanteraError& err) {
|
} catch (CanteraError& err) {
|
||||||
std::cout << err.what() << std::endl;
|
std::cout << err.what() << std::endl;
|
||||||
if (fl) {
|
delete fl;
|
||||||
delete fl;
|
|
||||||
}
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue