Skip to content

Commit 6ade4fe

Browse files
authored
fix memory issue by pruning the grid (SteveMacenski#274)
1 parent 562091a commit 6ade4fe

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/spatio_temporal_voxel_grid.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,9 @@ void SpatioTemporalVoxelGrid::TemporalClearAndGenerateCostmap(
218218
PopulateCostmapAndPointcloud(pt_index);
219219
}
220220
}
221+
222+
// free memory taken by expired voxels
223+
_grid->pruneGrid();
221224
}
222225

223226
/*****************************************************************************/

0 commit comments

Comments
 (0)