From 9921017a4b14b379d99305e17f8583ff90de0c1b Mon Sep 17 00:00:00 2001 From: fcolin Date: Thu, 18 Aug 2005 07:36:18 +0000 Subject: memory leak malloc/free cleanup --- src/ivyloop.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'src/ivyloop.c') 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 -#endif + #include #include #include #include #include -#ifndef WIN32 +#ifdef WIN32 +#include +#include +#else #include #include #include @@ -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() -- cgit v1.1