Actions
Bug #3539
closedWTimer::singleShot() can leak memory
Start date:
08/22/2014
Due date:
% Done:
0%
Estimated time:
Description
Here is implementation of WTimer::singleShot():
template
void WTimer::singleShot(int msec, const F& f)
{
WTimer *timer = new WTimer();
timer->setSingleShot(true);
timer->setInterval(msec);
timer->setSelfDestruct();
timer->start();
timer->timeout().connect(f);
}
timer deletes itself in "shot".
But it leaks if it never shots.
This can happen for the following reasons:
- session deads before it shots,
- memory leak attack.
Updated by Koen Deforche about 10 years ago
- Status changed from New to Resolved
- Assignee set to Koen Deforche
- Target version set to 3.3.4
Ah, good observation, fixed!
Updated by Koen Deforche about 10 years ago
- Status changed from Resolved to Closed
Actions