diff options
author | Pavel Labath <pavelo@centrum.sk> | 2011-07-14 11:08:43 (GMT) |
---|---|---|
committer | Pavel Labath <pavelo@centrum.sk> | 2011-11-01 09:57:22 (GMT) |
commit | 70b63f6aee4a612e34c729d5d19e5b0e0626fc7e (patch) | |
tree | a54f2b2f3220eecd7a3a58c9847392dcc3e02db9 /src | |
parent | ba986137a149af60a2675b4d7616699b28e2e8b3 (diff) | |
download | fluxbox_paul-70b63f6aee4a612e34c729d5d19e5b0e0626fc7e.zip fluxbox_paul-70b63f6aee4a612e34c729d5d19e5b0e0626fc7e.tar.bz2 |
Fix a small leak in FbTk::Lua
Diffstat (limited to 'src')
-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 | }; |