diff options
author | Bram Moolenaar <Bram@vim.org> | 2016-07-30 22:47:56 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2016-07-30 22:47:56 +0200 |
commit | 623e263ffb998acacd6fd0de18c44e03af2a47d1 (patch) | |
tree | d9db8377e5c762b97f715af27f115445f3a999c7 /src/ex_cmds2.c | |
parent | 3ab14355ed93958433eec58e96ec9bd9a472f2b2 (diff) | |
download | vim-git-623e263ffb998acacd6fd0de18c44e03af2a47d1.tar.gz |
patch 7.4.2130v7.4.2130
Problem: Pending timers cause false memory leak reports.
Solution: Free all timers on exit.
Diffstat (limited to 'src/ex_cmds2.c')
-rw-r--r-- | src/ex_cmds2.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/ex_cmds2.c b/src/ex_cmds2.c index ec9f50a52..2cebbebca 100644 --- a/src/ex_cmds2.c +++ b/src/ex_cmds2.c @@ -1279,6 +1279,21 @@ set_ref_in_timer(int copyID) } return abort; } + +# if defined(EXITFREE) || defined(PROTO) + void +timer_free_all() +{ + timer_T *timer; + + while (first_timer != NULL) + { + timer = first_timer; + remove_timer(timer); + free_timer(timer); + } +} +# endif # endif #if defined(FEAT_SYN_HL) && defined(FEAT_RELTIME) && defined(FEAT_FLOAT) |