1. Leak fixed
- Posted by Robert Craig <rds at RapidEuphoria.com> Feb 01, 2001
- 434 views
I created a .bat file to run a Windows Euphoria program many times per second in a loop. The system monitor crept up slowly, showing a small leak. Virtual memory (system swap space) was getting slowly eaten up. I replaced the call to the (ANSI C !) exit() at the end of the interpreter, substituting ExitProcess(). The leak is now completely gone. I had assumed that on Windows, WATCOM's exit() would call ExitProcess(), but apparently it doesn't. ExitProcess() is the normal way to end a WIN32 process. It cleans up a bunch of resources, including .dlls. Regards, Rob Craig Rapid Deployment Software http://www.RapidEuphoria.com
2. Re: Leak fixed
- Posted by Mike The Spike <mtsreborn at yahoo.com> Feb 01, 2001
- 446 views
Excelent news! Allthough I might suggest to code this instead; #ifdef WIN32 Exitprocess(); #else exit(); #endif It's more portable. Mike The Spike --- Robert Craig <rds at RapidEuphoria.com> wrote: > I created a .bat file to run a Windows Euphoria > program > many times per second in a loop. > > The system monitor crept up slowly, showing a small > leak. > Virtual memory (system swap space) was getting > slowly eaten up. > > I replaced the call to the (ANSI C !) exit() > at the end of the interpreter, substituting > ExitProcess(). The leak is now completely gone. > > I had assumed that on Windows, WATCOM's exit() > would call ExitProcess(), but apparently it doesn't. > ExitProcess() is the normal way to end a WIN32 > process. > It cleans up a bunch of resources, including .dlls. > > Regards, > Rob Craig > Rapid Deployment Software > http://www.RapidEuphoria.com > > >