I am pretty sure the answer is no, but I just wanted to make sure as I don’t want memory leaks.
I am using the following code
__constant__ void* VERTEX_NO_CONSTANT_PARAMETER;
HANDLE_ERROR( cudaMemcpyToSymbol( VERTEX_NO_CONSTANT_PARAMETER, &vertexNo, sizeof( int ) ) );
HANDLE_ERROR( cudaFree( VERTEX_NO_CONSTANT_PARAMETER ) );
It does not throw any errors at me which is putting doubt in my mind (I was hoping that cudaFree would error).
Thank you!
Kevin
No, you don’t. According to NVIDIA cuda library: