rocr: make sure the member variable is conctructed (#1387)
Signed-off-by: Alex Xie <AlexBin.Xie@amd.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
a330fb6b91
Коммит
c877be2afe
@@ -496,6 +496,9 @@ void GpuAgent::InitScratchPool() {
|
||||
|
||||
if (!core::Runtime::runtime_singleton_->flag().enable_scratch()) {
|
||||
scratch_pool_. ~SmallHeap();
|
||||
|
||||
// Reconstruct the object as default to allow ~GpuAgent to destruct the member variable
|
||||
new (&scratch_pool_) SmallHeap();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user