diff options
Diffstat (limited to 'src/qml/jsruntime/qv4function.cpp')
| -rw-r--r-- | src/qml/jsruntime/qv4function.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/qml/jsruntime/qv4function.cpp b/src/qml/jsruntime/qv4function.cpp index bf633a9b41..8c303a21ab 100644 --- a/src/qml/jsruntime/qv4function.cpp +++ b/src/qml/jsruntime/qv4function.cpp @@ -43,6 +43,9 @@ #include "qv4managed_p.h" #include "qv4string_p.h" #include "qv4value_p.h" +#include "qv4engine_p.h" +#include "qv4lookup_p.h" +#include "qv4unwindhelper_p.h" QT_BEGIN_NAMESPACE @@ -50,7 +53,14 @@ using namespace QV4; Function::~Function() { + engine->functions.remove(engine->functions.indexOf(this)); + UnwindHelper::deregisterFunction(this); + + Q_ASSERT(!refCount); delete[] codeData; + delete[] lookups; + foreach (Function *f, nestedFunctions) + f->deref(); } void Function::mark() |
