mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Thread: Reduce thread stop freeing on shutdown.
Seeing errors for helper threads not existing, so let's try skipping delete on shutdown. They already get freed anyway.
This commit is contained in:
parent
aedd51f2f6
commit
0a4f1dc49b
2 changed files with 7 additions and 1 deletions
|
@ -740,8 +740,12 @@ void __PsmfPlayerDoState(PointerWrap &p) {
|
|||
void __PsmfShutdown() {
|
||||
for (auto it = psmfMap.begin(), end = psmfMap.end(); it != end; ++it)
|
||||
delete it->second;
|
||||
for (auto it = psmfPlayerMap.begin(), end = psmfPlayerMap.end(); it != end; ++it)
|
||||
for (auto it = psmfPlayerMap.begin(), end = psmfPlayerMap.end(); it != end; ++it) {
|
||||
// Don't bother freeing, may already be freed.
|
||||
if (it->second->finishThread)
|
||||
it->second->finishThread->Forget();
|
||||
delete it->second;
|
||||
}
|
||||
psmfMap.clear();
|
||||
psmfPlayerMap.clear();
|
||||
}
|
||||
|
|
|
@ -304,6 +304,8 @@ void __UtilityShutdown() {
|
|||
npSigninDialog->Shutdown(true);
|
||||
|
||||
if (accessThread) {
|
||||
// Don't need to free it during shutdown, may have already been freed.
|
||||
accessThread->Forget();
|
||||
delete accessThread;
|
||||
accessThread = nullptr;
|
||||
accessThreadState = "shutdown";
|
||||
|
|
Loading…
Add table
Reference in a new issue