Delete callbacks when their thread is deleted.

This commit is contained in:
Unknown W. Brackets 2013-09-08 18:46:01 -07:00
parent 4bba276696
commit 1040123a97

View file

@ -464,6 +464,10 @@ public:
~Thread()
{
// Callbacks are automatically deleted when their owning thread is deleted.
for (auto it = callbacks.begin(), end = callbacks.end(); it != end; ++it)
kernelObjects.Destroy<Callback>(*it);
if (pushedStacks.size() != 0)
{
WARN_LOG_REPORT(SCEKERNEL, "Thread ended within an extended stack");