mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-10 17:01:24 +12:00
LLVM: Add explicit resource-freeing at emulation stop
This commit is contained in:
parent
a24e747e16
commit
81d0dd686b
4 changed files with 44 additions and 0 deletions
|
@ -3337,6 +3337,15 @@ void Emulator::Kill(bool allow_autoexit, bool savestate, savestate_stage* save_s
|
|||
|
||||
static_cast<void>(init_mtx->init());
|
||||
|
||||
// Call explcit semi-destructors (free memory before savestate)
|
||||
for (const auto& [type, data] : *g_fxo)
|
||||
{
|
||||
if (type.thread_op)
|
||||
{
|
||||
type.thread_op(data, thread_state::destroying_context);
|
||||
}
|
||||
}
|
||||
|
||||
auto set_progress_message = [&](std::string_view text)
|
||||
{
|
||||
*verbose_message = stx::make_single<std::string>(text);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue