mirror of
https://github.com/holub/mame
synced 2025-04-21 16:01:56 +03:00
Fixed annoying memory leak (no whatsnew)
This commit is contained in:
parent
a22a38c8f1
commit
079a719a01
@ -430,6 +430,12 @@ static void ui_menu_exit(running_machine &machine)
|
||||
/* free textures */
|
||||
machine.render().texture_free(hilight_texture);
|
||||
machine.render().texture_free(arrow_texture);
|
||||
|
||||
if (drivlist)
|
||||
{
|
||||
global_free(drivlist);
|
||||
drivlist = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -3720,7 +3726,7 @@ static void menu_select_game_build_driver_list(ui_menu *menu, select_game_state
|
||||
// start with an empty list
|
||||
// hack alert: use new directly here to avoid reporting this one-time static memory as unfreed
|
||||
if (drivlist == NULL)
|
||||
drivlist = new driver_enumerator(menu->machine().options());
|
||||
drivlist = global_alloc(driver_enumerator(menu->machine().options()));
|
||||
drivlist->exclude_all();
|
||||
|
||||
/* open a path to the ROMs and find them in the array */
|
||||
|
Loading…
Reference in New Issue
Block a user