mirror of
https://github.com/holub/mame
synced 2025-10-07 01:16:22 +03:00
netlist memory leak fix (no whatsnew)
This commit is contained in:
parent
b4304b06e7
commit
96ebed6493
@ -430,6 +430,10 @@ netlist_setup_t::netlist_setup_t(netlist_base_t &netlist)
|
|||||||
|
|
||||||
netlist_setup_t::~netlist_setup_t()
|
netlist_setup_t::~netlist_setup_t()
|
||||||
{
|
{
|
||||||
|
for (tagmap_devices_t::entry_t *entry = m_devices.first(); entry != NULL; entry = m_devices.next(entry))
|
||||||
|
{
|
||||||
|
remove_dev(entry->object()->name());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -929,6 +933,9 @@ void netlist_mame_device::device_reset()
|
|||||||
void netlist_mame_device::device_stop()
|
void netlist_mame_device::device_stop()
|
||||||
{
|
{
|
||||||
m_setup->print_stats();
|
m_setup->print_stats();
|
||||||
|
|
||||||
|
global_free(m_setup);
|
||||||
|
global_free(m_netlist);
|
||||||
}
|
}
|
||||||
|
|
||||||
void netlist_mame_device::device_post_load()
|
void netlist_mame_device::device_post_load()
|
||||||
|
@ -280,6 +280,10 @@ public:
|
|||||||
m_ptr = m_list;
|
m_ptr = m_list;
|
||||||
m_ptr--;
|
m_ptr--;
|
||||||
}
|
}
|
||||||
|
~net_list_t()
|
||||||
|
{
|
||||||
|
global_free(m_list);
|
||||||
|
}
|
||||||
ATTR_HOT inline void add(const _ListClass elem)
|
ATTR_HOT inline void add(const _ListClass elem)
|
||||||
{
|
{
|
||||||
assert(m_ptr-m_list <= _NumElements - 1);
|
assert(m_ptr-m_list <= _NumElements - 1);
|
||||||
|
Loading…
Reference in New Issue
Block a user