void Engines_Component_i::destroy()
{
MESSAGE("Engines_Component_i::destroy()");
- //SCRUTE(pd_refCount);
+ //SCRUTE(_refcount_value());
if(_myConnexionToRegistry)delete _myConnexionToRegistry;
_myConnexionToRegistry = 0 ;
if(_notifSupplier)delete _notifSupplier;
_notifSupplier = 0;
+ _poa->deactivate_object(*_id);
if(_id)
delete(_id) ;
- //SCRUTE(pd_refCount);
- _thisObj->_remove_ref();
- //SCRUTE(pd_refCount);
+ //SCRUTE(_refcount_value());
+ _remove_ref();
+ //SCRUTE(_refcount_value());
MESSAGE("Engines_Component_i::destroyed") ;
}
// ignore this entry and continue
}
}
+ _listInstances_map.clear();
_NS->Destroy_FullDirectory(_containerName.c_str());
_NS->Destroy_Name(_containerName.c_str());
- //_remove_ref();
- //_poa->deactivate_object(*_id);
if(_isServantAloneInProcess)
{
MESSAGE("Effective Shutdown of container Begins...");
Engines_Component_i *servant =
dynamic_cast<Engines_Component_i*>(_poa->reference_to_servant(iobject));
ASSERT(servant);
- //SCRUTE(servant->pd_refCount);
- servant->_remove_ref(); // compensate previous id_to_reference
- //SCRUTE(servant->pd_refCount);
+ //SCRUTE(servant->_refcount_value());
_numInstanceMutex.lock() ; // lock to be alone (stl container write)
_listInstances_map[instanceName] = iobject;
_cntInstances_map[aGenRegisterName] += 1;
_numInstanceMutex.unlock() ;
SCRUTE(aGenRegisterName);
SCRUTE(_cntInstances_map[aGenRegisterName]);
- //SCRUTE(servant->pd_refCount);
-#if defined(_DEBUG_) || defined(_DEBUG)
- bool ret_studyId = servant->setStudyId(studyId);
- ASSERT(ret_studyId);
-#else
servant->setStudyId(studyId);
-#endif
+ servant->_remove_ref(); // do not need servant any more (remove ref from reference_to_servant)
+ //SCRUTE(servant->_refcount_value());
// --- register the engine under the name
// containerName(.dir)/instanceName(.object)
#ifndef WIN32
struct sigaction SigIntAct ;
SigIntAct.sa_sigaction = &SigIntHandler ;
+ sigemptyset(&SigIntAct.sa_mask);
SigIntAct.sa_flags = SA_SIGINFO ;
#endif