automatically initialized as empty–you’re all good
More specifically:
in Port.hpp, which defines the Port struct, voltages is created with float[] = {} which as of C++11 zero-initializes the array, and channels is explicitly set to 0.
if all cables are disconnected from an output port, output.channels gets set to 0 in Engine.cpp but the voltages aren’t cleared (conceptually correct; if you unplug a cable the voltage is still present at the port, it’s just not being transmitted).
So if that’s what you expect, you’ll get the behavior you want without doing anything extra.
Put another way, it’s pointless to spend valuable cpu cycles to compute data to fill channels on unconnected outputs. That’s why you’ll see many modules that check isConnected before computing values for an output.
You also don’t need to spend cycles setting it to zero, either. There’s nothing to read that information and do somthing with it.