diff options
author | 2018-12-24 20:56:53 +1100 | |
---|---|---|
committer | 2018-12-24 12:07:02 +0100 | |
commit | bf3745ed2da7550bed35cc892fbed5053ba1b870 (patch) | |
tree | 3f5921132dae8725203bc445d76215d4703ce9f1 | |
parent | e4c8a74825a1245fe3a900b698a35914ee017212 (diff) |
it's important to construct/destruct objects (nw)
-rw-r--r-- | src/devices/cpu/drcbeut.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/devices/cpu/drcbeut.cpp b/src/devices/cpu/drcbeut.cpp index 3c752f9bcfd..99f2a0615ac 100644 --- a/src/devices/cpu/drcbeut.cpp +++ b/src/devices/cpu/drcbeut.cpp @@ -475,7 +475,10 @@ void drc_label_list::block_end(drcuml_block &block) // free all of the pending fixup requests label_fixup *fixup; while ((fixup = m_fixup_list.detach_head()) != nullptr) + { + fixup->~label_fixup(); m_cache.dealloc(fixup, sizeof(*fixup)); + } // make sure the label list is clear, and fatalerror if we missed anything reset(true); @@ -496,6 +499,7 @@ drccodeptr drc_label_list::get_codeptr(uml::code_label label, drc_label_fixup_de if (curlabel->m_codeptr == nullptr && !callback.isnull()) { label_fixup *fixup = reinterpret_cast<label_fixup *>(m_cache.alloc(sizeof(*fixup))); + new (fixup) label_fixup; fixup->m_callback = callback; fixup->m_label = curlabel; m_fixup_list.append(*fixup); |