diff options
author | Pavel Labath <pavelo@centrum.sk> | 2011-07-14 11:08:43 (GMT) |
---|---|---|
committer | Pavel Labath <pavelo@centrum.sk> | 2011-07-14 11:08:43 (GMT) |
commit | c163251a22fd7a75e95dc5c23b0ab1a16051cb27 (patch) | |
tree | d82f6b0b60c9e7d2b69f2d7037dd09643da84125 /src/FbTk | |
parent | 3c64f7b271b9fd96b946e16526d43e7306098ed7 (diff) | |
download | fluxbox_pavel-c163251a22fd7a75e95dc5c23b0ab1a16051cb27.zip fluxbox_pavel-c163251a22fd7a75e95dc5c23b0ab1a16051cb27.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 | }; |