Eliminate memory leak in demoequil.cpp

This commit is contained in:
Ray Speth 2014-12-12 01:36:48 +00:00
parent 7d19ee9488
commit 4e6205fa8c

View file

@ -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;
}
}