aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPavel Labath <pavelo@centrum.sk>2011-07-14 11:08:43 (GMT)
committerPavel Labath <pavelo@centrum.sk>2013-02-17 09:55:05 (GMT)
commit2eacf0ee090f5f6280f69a96d370928260b24877 (patch)
treeed98a74291d2a55df927447edd3cbfb26baa96f0
parent17dde49100067d2b59be068c227a10071a48a448 (diff)
downloadfluxbox_pavel-2eacf0ee090f5f6280f69a96d370928260b24877.zip
fluxbox_pavel-2eacf0ee090f5f6280f69a96d370928260b24877.tar.bz2
Fix a small leak in FbTk::Lua
-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};