How the oxygen produced by photosynthesis released

How the oxygen produced by photosynthesis released from the plant?Within the plant cell, the water is oxidized, meaning it loses electrons, while the carbon dioxide is reduced, meaning it gains electrons.

This transforms the water into oxygen and the carbon dioxide into glucose.the plant then releases the oxygen back into the air , and stores energy within the glucose molecules. then the process starts all over again