diff options
| author | 2008-01-11 06:33:08 +0000 | |
|---|---|---|
| committer | 2008-01-11 06:33:08 +0000 | |
| commit | 4f205d64beeed682a96e02c5433d8343cb1ae7b0 (patch) | |
| tree | 99ae8ead78c2249b55afacdc24ad8a1951268bfe | |
| parent | fd5b288fd3d799def81efb1f3a20d6785ed42730 (diff) | |
(From Atari Ace)
Fix memleak0122u2ora
| -rw-r--r-- | src/mame/video/ygv608.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mame/video/ygv608.c b/src/mame/video/ygv608.c index a006911550c..4c76fa02844 100644 --- a/src/mame/video/ygv608.c +++ b/src/mame/video/ygv608.c @@ -497,6 +497,14 @@ static void ygv608_register_state_save(void) state_save_register_func_postload(ygv608_postload); } +static void ygv608_exit(running_machine *machine) +{ + if( work_bitmap ) + bitmap_free( work_bitmap ); + work_bitmap = NULL; +} + + VIDEO_START( ygv608 ) { memset( &ygv608, 0, sizeof(ygv608) ); @@ -527,6 +535,7 @@ VIDEO_START( ygv608 ) tilemap_B = NULL; ygv608_register_state_save(); + add_exit_callback(machine, ygv608_exit); } static void draw_sprites(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect ) |
