1. Mode19 Engine BUG FIX - Update
- Posted by "Lucius L. Hilley III" <llhiii at bellsouth.net> May 25, 2002
- 432 views
It is with my sincere regrets that I must inform you of a memory leak that has gone undetected within the Mode19 Engine until now. The only way to correct the problem was to introduce a new procedure to the Engine, clean_up(). I also added a feature with this procedure. This means this is both an bug fix update and a mild upgrade. Memory was being allocated for our machine code but it was never freed. It had been the responsibility of the engine user to free() the memory he used when using Bmp2Mem() and to call x = set_screens(0) to free() the memory used by the virtual screens before closing/quitting/aborting the program. Two changes have been made. These changes "could" but "should not" break any existing code. 1. x = set_screens(integer) must be called before any call to Wait_Retrace() or any of the display routines. fdisplay(), cdisplay(), etc.... 2. You do not need to call x = set_screens(0) before closing/quitting/aborting the program. But, you should call clean_up(). clean_up() will free() the memory used for Bitmaps, machine code, and virtual screens. PS: Multiple calls to set_screens() will not cause multiple copies of the machine code to exist. Lucius L. Hilley III Representative of Hollow Horse Software