virtual ~PooledScope(){ ScopeCache * sc = scopeCache.get(); if ( sc ){ sc->done( _pool , _real ); _real = 0; } else { log() << "warning: scopeCache is empty!" << endl; delete _real; _real = 0; } }
virtual ~PooledScope() { ScopeCache* sc = scopeCache.get(); if (sc) { sc->done(_pool, _real); _real = NULL; } else { // this means that the Scope was killed from a different thread // for example a cursor got timed out that has a $where clause LOG(3) << "warning: scopeCache is empty!" << endl; delete _real; _real = 0; } }
void ScriptEngine::threadDone(){ ScopeCache * sc = scopeCache.get(); if ( sc ){ sc->clear(); } }