summaryrefslogtreecommitdiffhomepage
path: root/logic
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2017-02-27 09:28:05 +0100
committerStanislaw Halik <sthalik@misaki.pl>2017-02-27 09:28:05 +0100
commit99ab4eb8e64bdc7abe0a8751ada04342f21884f2 (patch)
tree388bcd8be137d1996f233f0de50ce206d2a6a59d /logic
parent517b118a8aa2a65a545fdb4ec8b720ad8c9ef3f6 (diff)
logic/shortcuts: free all heap memory in dtor
Diffstat (limited to 'logic')
-rw-r--r--logic/shortcuts.cpp5
-rw-r--r--logic/shortcuts.h1
2 files changed, 6 insertions, 0 deletions
diff --git a/logic/shortcuts.cpp b/logic/shortcuts.cpp
index 27d47c8b..6d77c3e0 100644
--- a/logic/shortcuts.cpp
+++ b/logic/shortcuts.cpp
@@ -106,6 +106,11 @@ void Shortcuts::receiver(const Key& k)
}
#endif
+Shortcuts::~Shortcuts()
+{
+ reload({});
+}
+
void Shortcuts::reload(const t_keys& keys_)
{
const unsigned sz = keys_.size();
diff --git a/logic/shortcuts.h b/logic/shortcuts.h
index 4ddc5b34..5a96e983 100644
--- a/logic/shortcuts.h
+++ b/logic/shortcuts.h
@@ -54,6 +54,7 @@ public:
: key_token([&](const Key& k) { receiver(k); })
#endif
{}
+ ~Shortcuts();
void reload(const t_keys& keys_);
private: