Fix a memory leak with the QmlJS scope chain.

This commit is contained in:
Christian Kamm
2010-02-22 11:21:03 +01:00
parent 28e348ace6
commit fcb6c4984e
3 changed files with 23 additions and 3 deletions

View File

@@ -48,6 +48,7 @@ void Link::scopeChainAt(Document::Ptr doc, const QList<Node *> &astPath)
if (doc->qmlProgram()) {
_context->setLookupMode(Context::QmlLookup);
scopeChain.qmlComponentScope.clear();
makeComponentChain(doc, &scopeChain.qmlComponentScope, &componentScopes);
if (const ObjectValue *typeEnvironment = _context->typeEnvironment(doc.data()))