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]
This commit is contained in:
کامیت شده توسط
Aidan Belton-Schure
والد
5a16db0cd5
کامیت
c59a9b3253
@@ -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();
|
||||
}
|
||||
|
||||
مرجع در شماره جدید
Block a user