Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 31, 2015, 11:54:06 AM (9 years ago)
Author:
landauf
Message:

StaticallyInitializedInstances are now responsible to delete the wrapped object.

Location:
code/branches/core7/src/libraries/network
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core7/src/libraries/network/NetworkFunctionIncludes.h

    r10478 r10520  
    5252        public:
    5353            StaticallyInitializedNetworkFunction(NetworkFunctionBase* function) : function_(function) {}
     54            ~StaticallyInitializedNetworkFunction() { delete function_; }
    5455
    5556            virtual void load();
  • code/branches/core7/src/libraries/network/NetworkFunctionManager.cc

    r10475 r10520  
    5454    }
    5555
    56     void NetworkFunctionManager::destroyAllNetworkFunctions()
    57     {
    58         std::set<NetworkFunctionBase*>::iterator it;
    59         for (it = this->functions_.begin(); it != this->functions_.end(); ++it)
    60             delete (*it);
    61     }
    62 
    6356    NetworkFunctionBase* NetworkFunctionManager::getFunctionByName(const std::string& name)
    6457    {
  • code/branches/core7/src/libraries/network/NetworkFunctionManager.h

    r10475 r10520  
    4646            void unregisterFunction(NetworkFunctionBase* function);
    4747
    48             void destroyAllNetworkFunctions();
    49 
    5048            inline const std::set<NetworkFunctionBase*>& getAllFunctions()
    5149                { return functions_; }
Note: See TracChangeset for help on using the changeset viewer.