mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-04 22:11:26 +12:00
Typemap: Set init to false after each individual destructor
This commit is contained in:
parent
69238bfc23
commit
3f5a80d692
2 changed files with 12 additions and 2 deletions
|
@ -135,7 +135,12 @@ namespace stx
|
|||
// Destroy objects in reverse order
|
||||
for (; _max; _max--)
|
||||
{
|
||||
(*--m_info)->destroy(*--m_order);
|
||||
auto* info = *--m_info;
|
||||
const u32 type_index = static_cast<const type_info<typeinfo>*>(info)->index();
|
||||
info->destroy(*--m_order);
|
||||
|
||||
// Set init to false. We don't want other fxo to use this fxo in their destructor.
|
||||
m_init[type_index] = false;
|
||||
}
|
||||
|
||||
// Pointers should be restored to their positions
|
||||
|
|
|
@ -313,7 +313,12 @@ namespace stx
|
|||
// Destroy objects in reverse order
|
||||
for (; _max; _max--)
|
||||
{
|
||||
(*--m_info)->destroy(*--m_order);
|
||||
auto* info = *--m_info;
|
||||
const u32 type_index = static_cast<const type_info<typeinfo>*>(info)->index();
|
||||
info->destroy(*--m_order);
|
||||
|
||||
// Set init to false. We don't want other fxo to use this fxo in their destructor.
|
||||
m_init[type_index] = false;
|
||||
}
|
||||
|
||||
// Pointers should be restored to their positions
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue