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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core7/src/libraries/core/commandline/CommandLineParser.cc

    r10509 r10520  
    8585    CommandLineParser::~CommandLineParser()
    8686    {
    87         CommandLineParser::destroyAllArguments();
    8887    }
    8988
     
    9695        static CommandLineParser instance;
    9796        return instance;
    98     }
    99 
    100     /**
    101     @brief
    102         Destroys all command line arguments. This should be called at the end
    103         of main. Do not use before that.
    104     */
    105     void CommandLineParser::destroyAllArguments()
    106     {
    107         for (std::map<std::string, CommandLineArgument*>::const_iterator it = _getInstance().cmdLineArgs_.begin();
    108             it != _getInstance().cmdLineArgs_.end(); ++it)
    109             delete it->second;
    110         _getInstance().cmdLineArgs_.clear();
    11197    }
    11298
Note: See TracChangeset for help on using the changeset viewer.