]> git.llucax.com Git - software/libev.git/blobdiff - ev_poll.c
better destroy support, separate into default loop and additional loops
[software/libev.git] / ev_poll.c
index 07b1f5caf7a491c03356fbf9490fac5be485f505..7a17d4f097a8d9ef304f592b864072dae78b775c 100644 (file)
--- a/ev_poll.c
+++ b/ev_poll.c
@@ -101,5 +101,15 @@ poll_init (EV_P_ int flags)
   method_modify = poll_modify;
   method_poll   = poll_poll;
 
+  pollidxs = 0; pollidxmax = 0;
+  polls    = 0; pollsmax   = 0; pollscnt = 0;
+
   return EVMETHOD_POLL;
 }
+
+static void
+poll_destroy (EV_P)
+{
+  free (pollidxs);
+  free (polls);
+}