Eliminate memory leak in demoequil.cpp
This commit is contained in:
parent
7d19ee9488
commit
4e6205fa8c
1 changed files with 1 additions and 2 deletions
|
|
@ -4,7 +4,7 @@ using namespace Cantera;
|
|||
|
||||
void equil_demo()
|
||||
{
|
||||
ThermoPhase* gas = newPhase("h2o2.cti","ohmech");
|
||||
std::auto_ptr<ThermoPhase> gas(newPhase("h2o2.cti","ohmech"));
|
||||
gas->setState_TPX(1500.0, 2.0*OneAtm, "O2:1.0, H2:3.0, AR:1.0");
|
||||
gas->equilibrate("TP");
|
||||
std::cout << gas->report() << std::endl;
|
||||
|
|
@ -19,4 +19,3 @@ int main()
|
|||
std::cout << err.what() << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue