cudaDeviceReset cause memory leak? the right way to use it? or other way to clear the device memory?

cudaDeviceReset cause memory leak? the right way to use it? or other way to clear the device memory?