I think there is a complex set of pressure valves.
It is not just ‘flushed’ overboard.
I was trolling for smart remarks.
Heck, on a nuke sub, maybe they just incinerate it.