summaryrefslogtreecommitdiff
path: root/ev.c
diff options
context:
space:
mode:
Diffstat (limited to 'ev.c')
-rw-r--r--ev.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/ev.c b/ev.c
index 12dffb3..774dd69 100644
--- a/ev.c
+++ b/ev.c
@@ -1738,6 +1738,15 @@ ev_loop_destroy (EV_P)
{
int i;
+#if EV_CLEANUP_ENABLE
+ /* queue cleanup watchers (and execute them) */
+ if (expect_false (cleanupcnt))
+ {
+ queue_events (EV_A_ (W *)cleanups, cleanupcnt, EV_CLEANUP);
+ EV_INVOKE_PENDING;
+ }
+#endif
+
#if EV_CHILD_ENABLE
if (ev_is_active (&childev))
{