how to clear RAM on the click on a button?
Android's RAM management has gotten quite good over the years, but if you really need to free up ram, I recommend this app: Taskmanager. It also features a widget to put in your homescreen.