Each member of the EU has a right to withdraw from the Union in accordance with its own constitutional requirements.

Algeria left when it became an independent country in 1962 (formerly part of France before then); Greenland voted to leave (formerly part of Denmark) in 1985.

More Info: en.wikipedia.org