summaryrefslogtreecommitdiff
path: root/src/script/squirrel.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-02-03 22:42:42 +0000
committerrubidium <rubidium@openttd.org>2009-02-03 22:42:42 +0000
commit2eebb525927a99630640f52dd51867ea8e989622 (patch)
tree4f0ff072e810fbda1bd6a01083ab7be1081bfdf3 /src/script/squirrel.cpp
parente628c5360dbd6fe063f379aff9898920f95d340e (diff)
downloadopenttd-2eebb525927a99630640f52dd51867ea8e989622.tar.xz
(svn r15330) -Fix [FS#2597]: leaking of Squirrel when using circular references (by enabling the GC).
Diffstat (limited to 'src/script/squirrel.cpp')
-rw-r--r--src/script/squirrel.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/script/squirrel.cpp b/src/script/squirrel.cpp
index 26196292c..1400eaf0a 100644
--- a/src/script/squirrel.cpp
+++ b/src/script/squirrel.cpp
@@ -175,6 +175,11 @@ bool Squirrel::Resume(int suspend)
return this->vm->_suspended != 0;
}
+void Squirrel::CollectGarbage()
+{
+ sq_collectgarbage(this->vm);
+}
+
bool Squirrel::CallMethod(HSQOBJECT instance, const char *method_name, HSQOBJECT *ret, int suspend)
{
/* Store the stack-location for the return value. We need to