From 5c85374ee34766d5d0c2224e08d8265eaecb090d Mon Sep 17 00:00:00 2001 From: Eduardo Bart Date: Mon, 30 May 2011 23:33:55 -0300 Subject: [PATCH] fix script leak --- src/framework/script/scriptable.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/framework/script/scriptable.h b/src/framework/script/scriptable.h index bbad58c3..4d6548d8 100644 --- a/src/framework/script/scriptable.h +++ b/src/framework/script/scriptable.h @@ -31,7 +31,9 @@ class Scriptable : public boost::enable_shared_from_this { public: Scriptable() : m_luaTableRef(-1) { } + virtual ~Scriptable() { releaseLuaTableRef(); } + //TODO: global destroy virtual const char *getScriptableName() const { return NULL; } int getLuaTableRef();