Some fixes and improvements

This commit is contained in:
GabsPuNs
2026-04-27 16:05:07 -04:00
parent 3aad8decb0
commit 3d10df97cf
20 changed files with 84 additions and 49 deletions

View File

@@ -194,6 +194,14 @@ C4JThread::~C4JThread()
}
LeaveCriticalSection(&ms_threadListCS);
#ifdef _WINDOWS64
if (m_threadHandle != nullptr && m_threadHandle != (HANDLE)-2)
{
CloseHandle(m_threadHandle);
m_threadHandle = nullptr;
}
#endif
}
#ifdef __PS3__
@@ -638,6 +646,19 @@ C4JThread::EventArray::EventArray( int size, EMode mode/* = e_modeAutoClear*/)
#endif // __PS3__
}
C4JThread::EventArray::~EventArray()
{
#ifdef _WINDOWS64
if (m_events) {
for (int i = 0; i < m_size; i++) {
if (m_events[i] != nullptr) {
CloseHandle(m_events[i]);
}
}
delete[] m_events;
}
#endif
}
void C4JThread::EventArray::Set(int index)
{