diff options
author | Yongjun Zhang <yongjun.zhang@nokia.com> | 2009-06-25 18:25:56 (GMT) |
---|---|---|
committer | axis <qt-info@nokia.com> | 2009-06-26 08:27:39 (GMT) |
commit | 0af00c3e45af09faab4598725de7f7258211d0f9 (patch) | |
tree | e1bb68abd0efbf929969fe9d5655a90a7368d251 /src | |
parent | d48bcd8ef8ed0f0a2331e9d2fbae272d153422cf (diff) | |
download | Qt-0af00c3e45af09faab4598725de7f7258211d0f9.zip Qt-0af00c3e45af09faab4598725de7f7258211d0f9.tar.gz Qt-0af00c3e45af09faab4598725de7f7258211d0f9.tar.bz2 |
Add releaseTimerId to unregisterTimer in Qt for S60 port
In Qt S60 port, releaseTimerId was not called, as a result, timer IDs are
not reused which makes nextTimeID reaches a very big number after an app
with periodic timer running for long time. This causes big memory consumption
in timerID bucket allocation and eventually crashes in S60.
Signed-off-by: axis <qt-info@nokia.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/kernel/qeventdispatcher_symbian.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/corelib/kernel/qeventdispatcher_symbian.cpp b/src/corelib/kernel/qeventdispatcher_symbian.cpp index 88e2a88..108c329 100644 --- a/src/corelib/kernel/qeventdispatcher_symbian.cpp +++ b/src/corelib/kernel/qeventdispatcher_symbian.cpp @@ -943,6 +943,9 @@ bool QEventDispatcherSymbian::unregisterTimer ( int timerId ) SymbianTimerInfoPtr timerInfo = m_timerList.take(timerId); + if (!QObjectPrivate::get(timerInfo->receiver)->inThreadChangeEvent) + QAbstractEventDispatcherPrivate::releaseTimerId(timerId); + return true; } |