Hydro-static pressure (P=hρg) comes about because of gravitational pull on the liquid. If the fluid has no weight, then the fluid molecules will not be pressing against the bottom and sides of its container, and against one another. So in outer space, or in an orbiting space station, water will not leak out through a hole in a cup. Astronauts do not even use cups, since water balls just hover in front of them anyway.
–
We can simulate zero gravity conditions in the cup simply by dropping it. When both the water and the cup are free falling together, gravity is “switched off” in the cup. The water stops pressing against the cup. The water basically “hovers” in the cup and becomes “weightless”. NO WEIGHT, NO PRESSURE. This explains why the water stops leaking out through the hole once the cup is dropped.