Swap files can contain evidence of browsing history

Two forensic reports describe extracting Tor Browser browsing history from a Windows pagefile.sys and hiberfil.sys:

See http://computerforensicsblog.champlain.edu/wp-content/uploads/2014/06/One-User-Multiple-Devices-Cross-Platform-Recovery-and-Analysis...-Saliba-Landry-5-20-2014.pdf#33 and https://web.archive.org/web/20160403075329/http://dfrws.org/2015eu/proceedings/DFRWS-EU-2015-short-presentation-1.pdf#16

Is there any way we can programmatically clean up the pagefile on New Identity and/or browser exit? What about OS X and Linux?