distance mesh deallocation, storing segement colors.