0
0
mirror of https://github.com/vim/vim.git synced 2025-09-25 03:54:15 -04:00

patch 7.4.2130

Problem:    Pending timers cause false memory leak reports.
Solution:   Free all timers on exit.
This commit is contained in:
Bram Moolenaar
2016-07-30 22:47:56 +02:00
parent 3ab14355ed
commit 623e263ffb
4 changed files with 22 additions and 1 deletions

View File

@@ -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)