diff --git a/projects/clr/rocclr/device/device.cpp b/projects/clr/rocclr/device/device.cpp index d090516013..cb96df25b0 100644 --- a/projects/clr/rocclr/device/device.cpp +++ b/projects/clr/rocclr/device/device.cpp @@ -649,6 +649,7 @@ Device::Device() blitProgram_(nullptr), context_(nullptr), heap_buffer_(nullptr), + initial_heap_buffer_(nullptr), arena_mem_obj_(nullptr), vaCacheAccess_(nullptr), vaCacheMap_(nullptr), @@ -662,6 +663,11 @@ Device::~Device() { heap_buffer_ = nullptr; } + if (initial_heap_buffer_ != nullptr) { + delete initial_heap_buffer_; + initial_heap_buffer_ = nullptr; + } + if (arena_mem_obj_ != nullptr) { arena_mem_obj_->release(); }