rocr: make sure the member variable is conctructed (#1387)
Signed-off-by: Alex Xie <AlexBin.Xie@amd.com>
This commit is contained in:
@@ -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