In chunk.cs CreateMesh, before assigning the new mesh to meshFIlter (meshFilter.mesh = mesh;), we have to destroy the old mesh (Object.Destroy(meshFilter.sharedMesh);); otherwise we will face memory leak. The leak is disastrous especially when you put lots of blocks in game (>1000).