Browse Source

fix(pointpillars_multihead):fix a memory leak error.

HAPO-9# 3 years ago
parent
commit
7835e6321a

+ 1 - 0
src/detection/detection_lidar_PointPillars_MultiHead/pointpillars.cc

@@ -490,6 +490,7 @@ void PointPillars::DoInference(const float* in_points_array,
 //        std::cout << setiosflags(ios::left) << setw(14) << Modules[i]  << setw(8)  << Times[i] * 1000 << " ms" << resetiosflags(ios::left) << std::endl;
 //    }
 //    std::cout << "------------------------------------" << std::endl;
+    GPU_CHECK(cudaFree(dev_points));
     cudaStreamDestroy(stream);
 
 }

+ 1 - 0
src/detection/detection_lidar_PointPillars_MultiHead/postprocess.cu

@@ -380,5 +380,6 @@ void PostprocessCuda::DoPostprocessCuda(
 
         GPU_CHECK(cudaFree(dev_indexes));
         GPU_CHECK(cudaFree(dev_sorted_filtered_box));
+        GPU_CHECK(cudaFree(dev_sorted_filtered_scores));
     }
 }