fix script leak

This commit is contained in:
Eduardo Bart 2011-05-30 23:33:55 -03:00
parent 9b2d71f6d8
commit 5c85374ee3
1 changed files with 2 additions and 0 deletions

View File

@ -31,7 +31,9 @@ class Scriptable : public boost::enable_shared_from_this<Scriptable>
{ {
public: public:
Scriptable() : m_luaTableRef(-1) { } Scriptable() : m_luaTableRef(-1) { }
virtual ~Scriptable() { releaseLuaTableRef(); }
//TODO: global destroy
virtual const char *getScriptableName() const { return NULL; } virtual const char *getScriptableName() const { return NULL; }
int getLuaTableRef(); int getLuaTableRef();