
    <bridgehead>Lifetime of Shared Objects</bridgehead>

    <para>
      <!-- ext. spec p. 48 --> An OpenCL memory object created from an OpenGL object
      (hereinafter refered to as a “shared CL/GL object”) remains valid as long as the
      corresponding GL object has not been deleted. If the GL object is deleted through the GL
      API (e.g. <function>glDeleteBuffers</function>, <function>glDeleteTextures</function>,
      or <function>glDeleteRenderbuffers</function>), subsequent use of the CL buffer or image
      object will result in undefined behavior, including but not limited to possible CL errors
      and data corruption, but may not result in program termination.
    </para>

    <para>
      <!-- ext. spec p. 48 --> The CL context and corresponding command-queues are dependent
      on the existence of the GL share group object, or the share group associated with the
      GL context from which the CL context is created. If the GL share group object or all GL
      contexts in the share group are destroyed, any use of the CL context or command-queue(s)
      will result in undefined behavior, which may include program termination. Applications
      should destroy the CL command-queue(s) and CL context before destroying the corresponding
      GL share group or contexts.
    </para>

<!-- 16-Oct-2011 -->

