diff --git a/runtime/mem_obj/mem_obj.cpp b/runtime/mem_obj/mem_obj.cpp index bb400b10d5..b35595fd94 100644 --- a/runtime/mem_obj/mem_obj.cpp +++ b/runtime/mem_obj/mem_obj.cpp @@ -64,14 +64,14 @@ MemObj::~MemObj() { } if (graphicsAllocation && !associatedMemObject && !isHostPtrSVM && graphicsAllocation->peekReuseCount() == 0) { memoryManager->removeAllocationFromHostPtrManager(graphicsAllocation); - bool doAsyncDestrucions = DebugManager.flags.EnableAsyncDestroyAllocations.get(); - if (!doAsyncDestrucions) { + bool doAsyncDestructions = DebugManager.flags.EnableAsyncDestroyAllocations.get(); + if (!doAsyncDestructions) { needWait = true; } if (needWait && graphicsAllocation->isUsed()) { memoryManager->waitForEnginesCompletion(*graphicsAllocation); } - destroyGraphicsAllocation(graphicsAllocation, doAsyncDestrucions); + destroyGraphicsAllocation(graphicsAllocation, doAsyncDestructions); graphicsAllocation = nullptr; }