rocr: make sure the member variable is conctructed (#1387)

Signed-off-by: Alex Xie <AlexBin.Xie@amd.com>
이 커밋은 다음에 포함됨:
Xie, AlexBin 작성하고 GitHub가 2025-11-05 17:19:33 -05:00를 커밋함
1 부모 a330fb6b91
커밋 c877be2afe
1 파일이 변경됨
+3
+3
파일 보기
@@ -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;
}