Add the unref work items to the front of the workqueue (Bug #3273)

Ensures that memory still gets freed even if the workqueue is overloaded.
This commit is contained in:
scrawl 2016-03-29 00:25:51 +02:00
parent bc36269617
commit 2f8be401cc
4 changed files with 12 additions and 8 deletions

View file

@ -40,7 +40,7 @@ namespace SceneUtil
if (mWorkItem->mObjects.empty())
return;
workQueue->addWorkItem(mWorkItem);
workQueue->addWorkItem(mWorkItem, true);
mWorkItem = new UnrefWorkItem;
}