Close the app in iPhone ios4

iPhone SDK Tips & Tricks

Go to info.plist. Right click on any line, select Add Row

Add UIApplicationExitsOnSuspend, and select Boolean for the Value Type.
Make sure it is checked.