Please report new issues athttps://github.com/DOCGroup
I'm putting this in bugzilla so we can remember to do something about this when we refactor DAnCE. --------------------------------- CIAO Version: 0.5.3 Area Affected: $CIAO_ROOT\DAnCE\TargetManager\DomainDataManager.cpp Descripton: My apologies before hand if this is a dumb question. I didn't have much to research this. I came across the following code by accident: //static variable CIAO::DomainDataManager* CIAO::DomainDataManager::global_data_manager_ = 0; CIAO::DomainDataManager * CIAO::DomainDataManager::create (CORBA::ORB_ptr orb, ::Deployment::TargetManager_ptr target ) { if (global_data_manager_ == 0) { global_data_manager_ = new DomainDataManager (orb , target); } return global_data_manager_; } The intent of the above code is to have a singleton, right? This code has the problem that two instances of DomainDataManager might be created, and only one destroyed, which will result in a memory leak. We really should be using the Double-Checked Locking Optimization pattern to prevent the problem I described above from happening. This is similar to what is done in ACE_Thread_Manager::instance() method. ------------------------------------------------------ Hi Abdul, Right, I agree with you. Will, can you please make sure we add this enhancement during the DAnCE refactoring? Thanks, Doug
to will
Updated component.
duplicate of new bug that is based on svn head *** This bug has been marked as a duplicate of bug 3590 ***