mirror of
https://github.com/holub/mame
synced 2025-04-18 22:49:58 +03:00
Fix memory leak on address_space_specific destruction and add a missing init [O. Galibert]
This commit is contained in:
parent
27309ec944
commit
2ec01d1901
@ -85,6 +85,11 @@ void k054321_device::device_start()
|
||||
save_item(NAME(m_active));
|
||||
}
|
||||
|
||||
void k054321_device::device_reset()
|
||||
{
|
||||
m_volume = 0;
|
||||
}
|
||||
|
||||
void k054321_device::device_add_mconfig(machine_config &config)
|
||||
{
|
||||
for (int i = 0; i < 3; i++)
|
||||
|
@ -26,6 +26,7 @@ public:
|
||||
|
||||
protected:
|
||||
void device_start() override;
|
||||
void device_reset() override;
|
||||
virtual void device_add_mconfig(machine_config &config) override;
|
||||
|
||||
private:
|
||||
|
@ -523,6 +523,11 @@ public:
|
||||
m_dispatch_write = m_root_write->get_dispatch();
|
||||
}
|
||||
|
||||
~address_space_specific() {
|
||||
m_root_read->unref();
|
||||
m_root_write->unref();
|
||||
}
|
||||
|
||||
std::pair<void *, void *> get_cache_info() override {
|
||||
std::pair<void *, void *> rw;
|
||||
rw.first = m_root_read;
|
||||
|
Loading…
Reference in New Issue
Block a user