Call cudaFree on all alloced device memory