aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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};