diff --git a/doc/sphinx/cxx-guide/demoequil.cpp b/doc/sphinx/cxx-guide/demoequil.cpp index 4688c2959..f99707fc5 100644 --- a/doc/sphinx/cxx-guide/demoequil.cpp +++ b/doc/sphinx/cxx-guide/demoequil.cpp @@ -4,7 +4,7 @@ using namespace Cantera; void equil_demo() { - ThermoPhase* gas = newPhase("h2o2.cti","ohmech"); + std::auto_ptr 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; } } -