mirror of https://github.com/odrling/Aegisub
Delete all commands on shutdown
Originally committed to SVN as r5473.
This commit is contained in:
parent
a8a30d6ac1
commit
faecc3304d
|
@ -107,4 +107,11 @@ namespace cmd {
|
|||
init_tool();
|
||||
init_video();
|
||||
}
|
||||
|
||||
void clear() {
|
||||
for (std::map<std::string, Command*>::iterator it = cmd_map.begin(); it != cmd_map.end(); ++it) {
|
||||
delete it->second;
|
||||
}
|
||||
cmd_map.clear();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -152,4 +152,7 @@ namespace cmd {
|
|||
/// Retrieve a Command object.
|
||||
/// @param Command object.
|
||||
Command* get(std::string const& name);
|
||||
|
||||
/// Unregister all commands
|
||||
void clear();
|
||||
} // namespace cmd
|
||||
|
|
|
@ -334,6 +334,7 @@ int AegisubApp::OnExit() {
|
|||
delete config::mru;
|
||||
delete agi::hotkey::hotkey;
|
||||
delete config::path;
|
||||
cmd::clear();
|
||||
|
||||
#ifdef WITH_AUTOMATION
|
||||
delete global_scripts;
|
||||
|
|
Loading…
Reference in New Issue