mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Timer: Ensure the timer thread is deleted before any static or global destructors run
In cases where there was a static or global instance of a class that inherited from Timer, due to the order of events when a dll is unloaded on windows, there was a risk of an infinite hang. Deleting the timer thread before the dll is unloaded avoids this occurring.
This commit is contained in:
parent
7b4f71e700
commit
9e9da250eb
2 changed files with 26 additions and 18 deletions
|
|
@ -141,7 +141,6 @@ private:
|
|||
class TimerThread;
|
||||
size_t positionInQueue = (size_t) -1;
|
||||
int timerPeriodMs = 0;
|
||||
SharedResourcePointer<TimerThread> timerThread;
|
||||
|
||||
Timer& operator= (const Timer&) = delete;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue