aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk/LuaUtil.hh
diff options
context:
space:
mode:
authorPavel Labath <pavelo@centrum.sk>2011-07-14 11:08:43 (GMT)
committerPavel Labath <pavelo@centrum.sk>2011-07-14 11:08:43 (GMT)
commitc163251a22fd7a75e95dc5c23b0ab1a16051cb27 (patch)
treed82f6b0b60c9e7d2b69f2d7037dd09643da84125 /src/FbTk/LuaUtil.hh
parent3c64f7b271b9fd96b946e16526d43e7306098ed7 (diff)
downloadfluxbox_pavel-c163251a22fd7a75e95dc5c23b0ab1a16051cb27.zip
fluxbox_pavel-c163251a22fd7a75e95dc5c23b0ab1a16051cb27.tar.bz2
Fix a small leak in FbTk::Lua
Diffstat (limited to 'src/FbTk/LuaUtil.hh')
-rw-r--r--src/FbTk/LuaUtil.hh8
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
69private: 69private:
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};