From 18543d6f9ee474be304cec2f95fbf5ae79de7d6e Mon Sep 17 00:00:00 2001 From: Danil An Date: Fri, 6 Feb 2026 15:18:28 +0400 Subject: [PATCH] fix: free memory after point cloud decimation with shrink_to_fit --- core/src/point_cloud.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/core/src/point_cloud.cpp b/core/src/point_cloud.cpp index c8408a5a..e9f61915 100644 --- a/core/src/point_cloud.cpp +++ b/core/src/point_cloud.cpp @@ -1582,6 +1582,13 @@ void PointCloud::decimate(double bucket_x, double bucket_y, double bucket_z) intensities = n_intensities; timestamps = n_timestamps; colors = n_colors; + + points_local.shrink_to_fit(); + normal_vectors_local.shrink_to_fit(); + points_type.shrink_to_fit(); + intensities.shrink_to_fit(); + timestamps.shrink_to_fit(); + colors.shrink_to_fit(); } void PointCloud::shift_to_center()