diff options
author | Olivier Goffart <ogoffart@trolltech.com> | 2009-08-25 09:45:20 +0200 |
---|---|---|
committer | Olivier Goffart <ogoffart@trolltech.com> | 2009-08-25 10:36:35 +0200 |
commit | a5a215eefff176eda3b1bb97ee70abfbab20f054 (patch) | |
tree | 2a66bc6d4727aa31217a975383191ed67abc9f1f /src/script/api/qscriptengine.cpp | |
parent | 5e43eb85043395655155edb5206de15024e3fb71 (diff) |
Memory leak in QScriptEngineAgent.
The documentation of the agent constructor specify that the agant is
owned by the engine. Even if the agent is not set to the engine
Reviewed-by: Kent Hansen
Diffstat (limited to 'src/script/api/qscriptengine.cpp')
-rw-r--r-- | src/script/api/qscriptengine.cpp | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/src/script/api/qscriptengine.cpp b/src/script/api/qscriptengine.cpp index 033d92e99..f4e959447 100644 --- a/src/script/api/qscriptengine.cpp +++ b/src/script/api/qscriptengine.cpp @@ -3585,9 +3585,6 @@ void QScriptEngine::setAgent(QScriptEngineAgent *agent) QScriptEngineAgentPrivate::get(d->activeAgent)->detach(); d->activeAgent = agent; if (agent) { - int index = d->ownedAgents.indexOf(agent); - if (index == -1) - d->ownedAgents.append(agent); QScriptEngineAgentPrivate::get(agent)->attach(); } } |