title: CUDA surface memory unbind
body: <p>When using texture memory in CUDA, we call <code>cudaBindTextureToArray(texRef, cuArray, channelDesc)</code>, use the texture, and then unbind it:</p>
  
  <pre><code>cudaUnbindTexture(texRef);
  </code></pre>
  
  <p>With surface memory, there is an analogous <code>cudaBindSurfaceToArray(surfRef, cuArray);</code></p>
  
  <p>but in the <a href="http://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#surface-memory" rel="nofollow noreferrer">Documentation</a> I have not found any mention of unbinding the surface, and my guess <code>cudaUnbindSurface(surfRef);</code> throws an error. Is surface reference unbinding not necessary/impossible and why is this different from texture reference?</p>