diff options
author | root <root> | 2007-11-04 23:29:48 +0000 |
---|---|---|
committer | root <root> | 2007-11-04 23:29:48 +0000 |
commit | aa07e8dd0ad9aa9952a6eeba2ef2b15429c08831 (patch) | |
tree | d1b53f64a365eebeb64e492329d29682ed2eb32d /ev.c | |
parent | 22b2a449105d7604f715c1afafeb4fe5ac473f1b (diff) |
*** empty log message ***
Diffstat (limited to 'ev.c')
-rw-r--r-- | ev.c | 17 |
1 files changed, 16 insertions, 1 deletions
@@ -234,6 +234,9 @@ ev_now (EV_P) cur = newcnt; \ } +#define array_free(stem, idx) \ + free (stem ## s idx); stem ## cnt idx = stem ## max idx = 0; + /*****************************************************************************/ static void @@ -636,6 +639,8 @@ loop_init (EV_P_ int methods) void loop_destroy (EV_P) { + int i; + #if EV_USE_WIN32 if (method == EVMETHOD_WIN32 ) win32_destroy (EV_A); #endif @@ -652,6 +657,16 @@ loop_destroy (EV_P) if (method == EVMETHOD_SELECT) select_destroy (EV_A); #endif + for (i = NUMPRI; i--; ) + array_free (pending, [i]); + + array_free (fdchange, ); + array_free (timer, ); + array_free (periodic, ); + array_free (idle, ); + array_free (prepare, ); + array_free (check, ); + method = 0; /*TODO*/ } @@ -796,7 +811,7 @@ call_pending (EV_P) { p->w->pending = 0; - (*(void (**)(EV_P_ W, int))&p->w->cb) (EV_A_ p->w, p->events); + ((void (*)(EV_P_ W, int))p->w->cb) (EV_A_ p->w, p->events); } } } |