summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <bgamari.foss@gmail.com>2017-04-22 09:33:31 -0400
committerBen Gamari <ben@smart-cactus.org>2017-04-23 11:05:48 -0400
commit87fbf39a61d2535a172fbcecec098730eba1777f (patch)
tree8781dbbbf21578d62bd846201e6970a96978b408
parent74e5ec9e63ff40bb8d52041cdc2f602d9bf12eb8 (diff)
downloadhaskell-87fbf39a61d2535a172fbcecec098730eba1777f.tar.gz
win32/Ticker: Stop ticker on exit
While debugging an unrelated issue I noticed that we leak a TimerQueueTimer on exit since we don't necessarily call stopTicker before exitTicker. Fix this. Test Plan: Validate on Windows Reviewers: simonmar, austin, erikd Reviewed By: simonmar Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3477
-rw-r--r--rts/win32/Ticker.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/rts/win32/Ticker.c b/rts/win32/Ticker.c
index 7bc5ed55e3..27c9070a50 100644
--- a/rts/win32/Ticker.c
+++ b/rts/win32/Ticker.c
@@ -73,6 +73,7 @@ stopTicker(void)
void
exitTicker (bool wait)
{
+ stopTicker();
if (timer_queue != NULL) {
DeleteTimerQueueEx(timer_queue, wait ? INVALID_HANDLE_VALUE : NULL);
timer_queue = NULL;