@@ -2466,8 +2466,6 @@ void HierRTLMP::calClusterMacroTilings(Cluster* parent)
24662466 remaining_runs -= run_thread;
24672467 }
24682468 // clean all the SA to avoid memory leakage
2469- for (auto & sa : sa_containers)
2470- delete sa;
24712469 sa_containers.clear ();
24722470 std::vector<std::pair<float , float >> tilings (macro_tilings.begin (),
24732471 macro_tilings.end ());
@@ -2693,8 +2691,6 @@ void HierRTLMP::calHardMacroClusterShape(Cluster* cluster)
26932691 remaining_runs -= run_thread;
26942692 }
26952693 // clean the sa_container to avoid memory leakage
2696- for (auto & sa : sa_containers)
2697- delete sa;
26982694 sa_containers.clear ();
26992695 // sort the tilings based on area
27002696 std::vector<std::pair<float , float >> tilings (macro_tilings.begin (),
@@ -3427,7 +3423,6 @@ void HierRTLMP::multiLevelMacroPlacement(Cluster* parent)
34273423 target_util_list[i],
34283424 target_dead_space_list[i]);
34293425 sa_containers[i]->printResults ();
3430- delete sa_containers[i];
34313426 }
34323427 logger_->error (MPL,
34333428 2032 ,
@@ -3645,7 +3640,6 @@ void HierRTLMP::multiLevelMacroPlacement(Cluster* parent)
36453640 target_util_list[i],
36463641 target_dead_space_list[i]);
36473642 sa_containers[i]->printResults ();
3648- delete sa_containers[i];
36493643 }
36503644 logger_->error (MPL,
36513645 2049 ,
@@ -3712,8 +3706,6 @@ void HierRTLMP::multiLevelMacroPlacement(Cluster* parent)
37123706 }
37133707
37143708 // delete SA containers to avoid memory leakage
3715- for (auto & sa : sa_containers)
3716- delete sa;
37173709 sa_containers.clear ();
37183710 // done this branch and update the cluster_id property back
37193711 setInstProperty (parent);
@@ -4333,7 +4325,7 @@ void HierRTLMP::hardMacroClusterMacroPlacement(Cluster* cluster)
43334325 if (best_sa == nullptr ) {
43344326 for (auto & sa : sa_containers) {
43354327 sa->printResults ();
4336- delete sa;
4328+ // need
43374329 }
43384330 sa_containers.clear ();
43394331 std::string line
@@ -4358,8 +4350,6 @@ void HierRTLMP::hardMacroClusterMacroPlacement(Cluster* cluster)
43584350 hard_macro->updateDb (pitch_x_, pitch_y_);
43594351 }
43604352 // clean SA to avoid memory leakage
4361- for (auto & sa : sa_containers)
4362- delete sa;
43634353 sa_containers.clear ();
43644354 setInstProperty (cluster);
43654355}
0 commit comments