In modern refrigerators, the system does this automatically, but we recommend turning off the water line to avoid unpleasant incidents.