Free allocated device temporary memory after each run