Fixed an error that I had introduced.

This commit is contained in:
Harry Moffat 2003-09-03 19:59:50 +00:00
parent 0aaaab9c98
commit fe1f006419
2 changed files with 10 additions and 3 deletions

View file

@ -101,6 +101,13 @@ namespace Cantera {
return __factory;
}
static void deleteFalloffFactory() {
if (__factory) {
delete __factory;
__factory = 0;
}
}
/**
* Destructor doesn't do anything. We do not delete statically
* created single instance of this class here, because it would

View file

@ -31,7 +31,7 @@ namespace Cantera {
* will be used.
*/
FalloffMgr(FalloffFactory* f = 0) :
m_factory(0), m_n(0), m_n0(0), m_worksize(0) {
m_n(0), m_n0(0), m_worksize(0) {
if (f == 0) m_factory = FalloffFactory::factory();
else m_factory = f;
}
@ -44,7 +44,7 @@ namespace Cantera {
int i;
for (i = 0; i < m_n; i++) delete m_falloff[i];
if (m_factory) {
delete m_factory;
FalloffFactory::deleteFalloffFactory();
m_factory = 0;
}
}
@ -58,7 +58,7 @@ namespace Cantera {
* @param c vector of coefficients for the falloff function.
*/
void install(int rxn, int type,
const vector_fp& c) {
const vector_fp& c) {
if (type != SIMPLE_FALLOFF) {
m_rxn.push_back(rxn);
Falloff* f = m_factory->newFalloff(type,c);