You can easily clear the RAM on an iPhone by following these steps:
1. Go to Settings . . . Accessibility . . . Touch, and select the option for AssistiveTouch.
2. Then go to Settings . . . General . . . Shut Down
3. Rather than swiping 'slide to power off', press the white AssistiveTouch button, and then hold the home button for five seconds.
4. The RAM on the phone should be cleared. This will enable the phone to function faster.
Keep in mind that RAM is volatile or temporary memory. Clearing the RAM may erase some app data, as well as passwords and encryption keys. Volatile user data on an iPhone is encrypted, and cannot be easily acquired by a forensic process.
Non-volatile memory (emails, contacts, text messages and other system files) is retained even after RAM is cleared. Non-volatile memory is also called NAND flash.