Stability of metallic thin films studied with a free electron model