It seems that Facebook's popular messaging app Whatsapp would have the tendency of saving deleted messages on our phones, more specifically on IOS.
According to the report of the mobile security expert Jonathan Zdziarski : WhatsApp is deleting the record, however the record itself is not being purged or erased from the database, leaving a forensic artifact that can be recovered and reconstructed back into its original form.
Forensic trace is common among any application that uses SQLite, because SQLite by default does not vacuum databases on iOS (likely in an effort to prevent wear). When a record is deleted, it is simply added to a “free list”, but free records do not get overwritten until later on when the database needs the extra storage (usually after many more records are created). If you delete large chunks of messages at once, this causes large chunks of records to end up on this “free list”, and ultimately takes even longer for data to be overwritten by new data. There is no guarantee the data will be overwritten by the next set
In other words whenever you delete messages, Whatsapp leaves legal traces on your phone meaning the message isn't completely deleted and somebdoy who has access to you phone can retrieve those datas by a simple backup. The expert also points out that the same issue is experience on iMessage. All your iMessage contents are synchronised with iCloud and deleting these contents won't delete them from your iCloud enabling these contents to be available from your iPad, MackBook, iPhone or an iPod in short from any device that receives iMessages.
What does this means ?
Although Whatsapp has an end-to-end encrytion of messages preventing any third party from remotely accessing your conversations, somebody with a physical access to your device, can easily access these deleted contents.
Concerning Apple's iMessage app, law enforcement can issue warrant with Apple to obtain your deleted messages. Same goes for if you're synchronising you Whatsapp data with any cloud service.
What can I do
The expert actually proposed some temporary solutions to the problem.
About Whatsapp, the expert proposed that deleting the app is the only solution available to the problem for now. So if you have a conversation that you judge sensitive and you'll like to avoid it to get into bad hands, you can just delete the app and install it later on.
Concerning iMessage, you can set your desktops backups to be automatically encrypyted in iTunes. However this option isn't available in iCloud and law enforcement authorities could easily acess the datas store in your iCloud. To counterattck this you can simply disable iCloud so that it will stop synchronising you iMessages. But I guess this will somehow be troublesome as you're using iCloud for other more important purposes.
However take in account that these are just temporary solutions to the problem. Solutions on iMessage would still not prevent law enforcement to retrieve these messages except of you disable iCould backups. Apple is already working on the problem according to Zdziarski, however, Whatsapp still hasn't responded to Zdziarski's report.