diff options
author | fcolin | 2005-08-18 07:36:18 +0000 |
---|---|---|
committer | fcolin | 2005-08-18 07:36:18 +0000 |
commit | 9921017a4b14b379d99305e17f8583ff90de0c1b (patch) | |
tree | 2f76b0a528a766ee67be1ba82973f02acc6e85c2 /src/ivyloop.c | |
parent | f625f6e00c1d5d1194ce3db62e59ccc47fdf2386 (diff) | |
download | ivy-c-9921017a4b14b379d99305e17f8583ff90de0c1b.zip ivy-c-9921017a4b14b379d99305e17f8583ff90de0c1b.tar.gz ivy-c-9921017a4b14b379d99305e17f8583ff90de0c1b.tar.bz2 ivy-c-9921017a4b14b379d99305e17f8583ff90de0c1b.tar.xz |
memory leak malloc/free cleanup
Diffstat (limited to 'src/ivyloop.c')
-rw-r--r-- | src/ivyloop.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/ivyloop.c b/src/ivyloop.c index 278e098..ab50f75 100644 --- a/src/ivyloop.c +++ b/src/ivyloop.c @@ -15,16 +15,17 @@ * copyright notice regarding this software */ -#ifdef WIN32 -#include <windows.h> -#endif + #include <stdlib.h> #include <errno.h> #include <stdio.h> #include <stdarg.h> #include <string.h> -#ifndef WIN32 +#ifdef WIN32 +#include <crtdbg.h> +#include <windows.h> +#else #include <unistd.h> #include <sys/time.h> #include <sys/types.h> @@ -160,6 +161,7 @@ void IvyChannelInit (void) void IvyChannelStop (void) { MainLoop = 0; + ChannelDefferedDelete(); /* this will force select to exit on multithread */ } void IvyMainLoop(void(*hook)(void)) @@ -181,12 +183,12 @@ void IvyMainLoop(void(*hook)(void)) return; } TimerScan(); - if (ready > 0) { + if ( MainLoop && ready > 0) { IvyChannelHandleExcpt(&exset); IvyChannelHandleRead(&rdset); continue; } - } + } } void IvyIdle() |