aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPavel Labath <pavelo@centrum.sk>2011-07-14 11:08:43 (GMT)
committerPaul Tagliamonte <paultag@fluxbox.org>2012-04-07 02:11:31 (GMT)
commit03815f76c732a69dcad9165022678933165155c0 (patch)
tree0e2398bea27b2624c4167dc60ada7b2165bdada9
parent6fad392312cf634020354fd66afe95ca530d18e7 (diff)
downloadfluxbox_paul-03815f76c732a69dcad9165022678933165155c0.zip
fluxbox_paul-03815f76c732a69dcad9165022678933165155c0.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};