Currently the iPhone does not securely erase your data for you and if you have to return your iPhone to Apple or sell it on eBay, your data can possibly be retrieve by unwanted eyes. Currently you can manually erase your private data.
The iPhone 2.0 firmware now securely erases user data. It will overwrite it with random information and the entire process could take up to an hour. This is a much needed feature as well as the promised remote wipe which we have not heard any new details on.
According to official statements made by Apple during its developers conference earlier this month, as well as this press release, “iPhone 2.0 software will be available on July 11 as a free software update via iTunes 7.7 or later for all iPhone customers.” However, a gold master version may be provided to some Apple employees and partners as early as friday.