Use MemoryManager retrieved from ExecutionEnvironment in Kernel dtor

Change-Id: I5f3880e1a95b3cbd262847d97776b0b92a580181
This commit is contained in:
Zdanowicz, Zbigniew
2019-02-06 14:30:32 +01:00
committed by sys_ocldev
parent 62e56d2398
commit 44491a111c
2 changed files with 15 additions and 2 deletions

View File

@@ -100,12 +100,12 @@ Kernel::~Kernel() {
crossThreadDataSize = 0;
if (privateSurface) {
device.getMemoryManager()->checkGpuUsageAndDestroyGraphicsAllocations(privateSurface);
program->peekExecutionEnvironment().memoryManager->checkGpuUsageAndDestroyGraphicsAllocations(privateSurface);
privateSurface = nullptr;
}
if (kernelReflectionSurface) {
device.getMemoryManager()->freeGraphicsMemory(kernelReflectionSurface);
program->peekExecutionEnvironment().memoryManager->freeGraphicsMemory(kernelReflectionSurface);
kernelReflectionSurface = nullptr;
}