Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 30, 2009, 2:44:06 PM (15 years ago)
Author:
scheusso
Message:

added NetworkFunctionBase::destroyAllNetworkFunctions to cleanup premain created stuff

Location:
code/branches/netp6/src/network
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/netp6/src/network/NetworkFunction.cc

    r3214 r3256  
    5656 
    5757 
     58  void NetworkFunctionBase::destroyAllNetworkFunctions()
     59  {
     60    std::map<std::string, NetworkFunctionBase*>::iterator it;
     61    for( it=NetworkFunctionBase::nameMap_.begin(); it!=NetworkFunctionBase::nameMap_.end(); ++it )
     62      delete it->second;
     63  }
     64 
    5865 
    5966  NetworkFunctionStatic::NetworkFunctionStatic(FunctorStatic* functor, const std::string& name, const NetworkFunctionPointer& p):
  • code/branches/netp6/src/network/NetworkFunction.h

    r3214 r3256  
    8080   
    8181    static inline void setNetworkID(const std::string& name, uint32_t id){ assert( nameMap_.find(name)!=nameMap_.end() ); nameMap_[name]->setNetworkID(id); }
     82   
     83    static void destroyAllNetworkFunctions();
    8284   
    8385  protected:
Note: See TracChangeset for help on using the changeset viewer.