Changeset 10520 for code/branches/core7/src/libraries/core/commandline
- Timestamp:
- May 31, 2015, 11:54:06 AM (10 years ago)
- Location:
- code/branches/core7/src/libraries/core/commandline
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core7/src/libraries/core/commandline/CommandLineIncludes.h
r10404 r10520 59 59 public: 60 60 StaticallyInitializedCommandLineArgument(CommandLineArgument* argument) : argument_(argument) {} 61 ~StaticallyInitializedCommandLineArgument() { delete argument_; } 61 62 62 63 virtual void load() -
code/branches/core7/src/libraries/core/commandline/CommandLineParser.cc
r10509 r10520 85 85 CommandLineParser::~CommandLineParser() 86 86 { 87 CommandLineParser::destroyAllArguments();88 87 } 89 88 … … 96 95 static CommandLineParser instance; 97 96 return instance; 98 }99 100 /**101 @brief102 Destroys all command line arguments. This should be called at the end103 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();111 97 } 112 98 -
code/branches/core7/src/libraries/core/commandline/CommandLineParser.h
r10404 r10520 161 161 } 162 162 163 static void destroyAllArguments();164 165 163 static void generateDoc(std::ofstream& file); 166 164
Note: See TracChangeset
for help on using the changeset viewer.