mem allocation without free / remain data on mem?

Hi all,

I have a question concerning data in the device memory. If I allocate memory using cudaMalloc() and copy data to the device using cudaMemcpy(), what happens if my application terminates without freeing this memory? Is the data still in the devices’ memory or is the memory freed automatically?
If the data remain on the cards’ memory, is there a way to clear / free all memory on the graphic card when starting a new CUDA program (just to be sure that a maximum of memory is available for the program)?

I use a 8800GTX card with WinXP SP2.

Thanks in advance and best regards,

The driver will remove all resources if the app process dies.


Thanks for the fast reply :)