Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
6.0.0, 6.0.3
-
None
-
Windows 7 x64 Ultimate
Description
I don't think this is expected behavior since a singleshot should be triggered and then deallocated.
Steps to reproduce:
- Create a new Qt Widgets app.
- Create a function slot on MainWindow. Mine is called "executionLoop()"
- Call the function slot from the MainWindow constructor.
- Put the following code in the function:
void MainWindow::executionLoop()
{
QTimer::singleShot(1, Qt::PreciseTimer, this, SLOT(executionLoop()));
}
The process will slowly but steadily use more RAM while never freeing it. executionLoop is called once from outside and only recursively after that, so only one timer should be active at a given time.
Minimal test project is attached.
After some more testing, the problem seems to persist up to around a timer of 400 milliseconds, though it's really, really slow. It seems to drop off at about 500 milliseconds.
This also occurs with a recurring QTimer created and connected from outside the loop and an empty slot function.
Attachments
Issue Links
- relates to
-
QTBUG-93019 [REG 5.15-6.0] QList/QVector regressions
- Open
-
QTBUG-91801 Potential memory leak in sending queued signals?
- Closed
Gerrit Reviews
For Gerrit Dashboard: QTBUG-92912 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
344081,3 | QPostEventList: port to std::vector | dev | qt/qtbase | Status: NEW | -1 | 0 |