diff options
author | Pavel Labath <pavelo@centrum.sk> | 2011-07-14 11:08:43 (GMT) |
---|---|---|
committer | Pavel Labath <pavelo@centrum.sk> | 2013-02-17 09:55:05 (GMT) |
commit | 2eacf0ee090f5f6280f69a96d370928260b24877 (patch) | |
tree | ed98a74291d2a55df927447edd3cbfb26baa96f0 /src/FbTk | |
parent | 17dde49100067d2b59be068c227a10071a48a448 (diff) | |
download | fluxbox_pavel-2eacf0ee090f5f6280f69a96d370928260b24877.zip fluxbox_pavel-2eacf0ee090f5f6280f69a96d370928260b24877.tar.bz2 |
Fix a small leak in FbTk::Lua
Diffstat (limited to 'src/FbTk')
-rw-r--r-- | src/FbTk/LuaUtil.hh | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/FbTk/LuaUtil.hh b/src/FbTk/LuaUtil.hh index cdd1934..d013ed9 100644 --- a/src/FbTk/LuaUtil.hh +++ b/src/FbTk/LuaUtil.hh | |||
@@ -68,7 +68,13 @@ public: | |||
68 | 68 | ||
69 | private: | 69 | private: |
70 | typedef Slot<void, Lua &> InitFunction; | 70 | typedef Slot<void, Lua &> InitFunction; |
71 | typedef std::vector<InitFunction *> InitFunctions; | 71 | struct AutoVector: public std::vector<InitFunction *> { |
72 | ~AutoVector() { | ||
73 | for(iterator it = begin(); it != end(); ++it) | ||
74 | delete *it; | ||
75 | } | ||
76 | }; | ||
77 | typedef AutoVector InitFunctions; | ||
72 | 78 | ||
73 | static InitFunctions s_init_functions; | 79 | static InitFunctions s_init_functions; |
74 | }; | 80 | }; |