The cameras on the latest MacBook Air and MacBook Pros aren't disconnected, however, as the 'field of view is completely obstructed when the lid is closed,' Apple says in its T2 security chip documentation.
With a physical disconnection, software-based attacks like the FruitFly malware can't enable the microphone. It's Apple's 'T2' security chip that the company includes in its latest lineup of MacBook Air and MacBook Pros that physically disconnects the microphones when the lid is closed. Apple's latest MacBook Air and 2018 MacBook Pros physically disconnect their own microphones when you close the lid, preventing eavesdropping hackers from listening in to conversations when you think the computer is in sleep mode with the lid closed.