CUDA_ERROR_CONTEXT_ALREADY_CURRENT in debug mode.

Hi, all.

I changed my compile to D_DEBUG, then I get a error
CUDA_ERROR_CONTEXT_ALREADY_CURRENT when it trys to create the context. (CUresult 202)

My routine only create the context and use it.

But the program works fine in Non-DEBUG mode.

I wonder when I need to detach the context when the program quits and winder if
that is necessary.

Thanks.

S.