SWDEV-485827 release initial_heap_buffer_

This PR adds the initialization and release of initial_heap_buffer_
to prevent memory leaks.

Change-Id: I4ab8721b439a1a3a6f6e53d63d870e572f7c984a


[ROCm/clr commit: f42a87dc2f]
Этот коммит содержится в:
Aidan Belton-Schure
2024-09-25 09:20:14 +00:00
коммит произвёл Aidan Belton-Schure
родитель 5a16db0cd5
Коммит c59a9b3253
+6
Просмотреть файл
@@ -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();
}