I am making a procedurally generated smooth terrain world. As the player moves through the world, more terrain gets generated. The terrain is generated by using Terrain:FillBlock(TerrainCFrame, Vector3.new(8, 8, 8), "Grass"). The terrain behind the player gets unloaded by using Terrain:FillRegion(TerrainRegion, 4, "Air") in 64x64 stud chunks. This clears TerrainVoxels but TerrainPhysics doesn’t get cleared. After a few minutes this takes up hundreds of MB of memory and will probably crash after playing for a long time
Hey, I just enabled something that should properly clean up physics for deleted Terrain. Its a bit conservative, so if you spawn a large chunk, and delete half the volume sparsely, it may not reduce the memory footprint, but if you do a large clean deletion you should be able to get the memory back.
Can you verify if the problem you described still happens? (Repro will still happen in Studio since Studio still hasn’t been patched from 413 to 414).