In Windows XP, there is option in the registry that let’s you clear the pagefile at shutdown. Follow the steps shown below to clear page file on shutdown:
1. Go to Run > type “Regedit” (without quotes)
2. Navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management
3. Select ClearPageFileAtShutdown entry.
4. Right click on it and select Modify.
5. Change the value to 1 to enable.
6. Reboot your computer.
After this modification of registry value, windows will take some time before shutting down your computer.
