Fix memory leak in MeshUpdateThread