The easiest way to close all the windows is by closing down applications. Open your phone and unlock it (if it's locked) and while you are in the homescreen menu, simply press and hold the MENU button until another menu appears. Close all the applications then access Task Manager. Click on END Task for all the applications. Switch to Memory tab and then tap on Clear Memory. This will wipe everything from memory. If you're using a browser, start it and close the windows manually.