Release the pNativeTextureHandle provided from the GetOverlayTexture call, this allows the system to free the underlying GPU resources for this object,
        so only do it once you stop rendering this texture.
176474
def releaseNativeOverlayHandle(self, ulOverlayHandle, pNativeTextureHandle):
        

        fn = self.function_table.releaseNativeOverlayHandle
        result = fn(ulOverlayHandle, pNativeTextureHandle)
        return result
1286277
function(unit) {
        var gl = this.gl;
        this.unit = unit;
        this.name = "TEXTURE" + unit;
        this.manager.setActiveTexture(this);
        gl.bindTexture(gl.TEXTURE_2D, this.glTexture);
    }
261525
function (src, data, handleImageTextureLoaded) {
    var hash = this.hash(data);
    var textureCache = this.textureCache;

    // Texture already being loaded or already loaded. Wait on promise.
    if (textureCache[hash]) {
      textureCache[hash].then(handleImageTextureLoaded);
      return;
    }

    // Texture not yet being loaded. Start loading it.
    textureCache[hash] = loadImageTexture(src, data);
    textureCache[hash].then(handleImageTextureLoaded);
  }
795835
public static void releaseDataFrame(Http2SourceHandler http2SourceHandler, Http2DataFrame dataFrame) {
        int streamId = dataFrame.getStreamId();
        HttpCarbonMessage sourceReqCMsg = http2SourceHandler.getStreamIdRequestMap().get(streamId);
        if (sourceReqCMsg != null) {
            sourceReqCMsg.addHttpContent(new DefaultLastHttpContent());
            http2SourceHandler.getStreamIdRequestMap().remove(streamId);
        }
        dataFrame.getData().release();
    }
1041930
public void close()
    {
        freeDataBuffer();
        frameSizeBuffer.free();
        transport.close();

        if (response != null)
            response.close();
    }
531987
public void bindTexture(GuiTexture texture)
	{
		//no change needed
		if (texture == currentTexture)
			return;

		next();
		Minecraft.getMinecraft().getTextureManager().bindTexture(texture.getResourceLocation());
		//System.out.println(currentComponent + " // Bound " + texture.getResourceLocation());

		currentTexture = texture;
	}
1002862
@Override
    protected void onAttachedToWindow() {
        super.onAttachedToWindow();
        if (LOG_ATTACH_DETACH) {
            Log.d(TAG, "onAttachedToWindow reattach =" + mDetached);
        }
        if (mDetached && (mRenderer != null)) {
            int renderMode = RENDERMODE_CONTINUOUSLY;
            if (mGLThread != null) {
                renderMode = mGLThread.getRenderMode();
            }
            mGLThread = new GLThread(mThisWeakRef);
            if (renderMode != RENDERMODE_CONTINUOUSLY) {
                mGLThread.setRenderMode(renderMode);
            }
            mGLThread.start();
        }
        mDetached = false;
    }
23923
def setOverlayRaw(self, ulOverlayHandle, pvBuffer, unWidth, unHeight, unDepth):
        

        fn = self.function_table.setOverlayRaw
        result = fn(ulOverlayHandle, pvBuffer, unWidth, unHeight, unDepth)
        return result
5453
def delete(self):
        
        # We only allow the object from being deleted once, otherwise
        # we might be deleting another GPU object that got our gl-id
        # after our GPU object was deleted. Also note that e.g.
        # DataBufferView does not have the _glir attribute.
        if hasattr(self, '_glir'):
            # Send our final command into the queue
            self._glir.command('DELETE', self._id)
            # Tell master glir queue that this queue is no longer being used
            self._glir._deletable = True
            # Detach the queue
            del self._glir
1149427
def destroyOverlay(self, ulOverlayHandle):
        

        fn = self.function_table.destroyOverlay
        result = fn(ulOverlayHandle)
        return result
1191013
function( unit ){
    var gl = this.gl;
    if( unit !== undefined ){
      gl.activeTexture( gl.TEXTURE0 + (0|unit) );
    }
    gl.bindTexture( T2D, this.id );
  }
536011
def interrupt(self):
		
		self.image = io.BytesIO()
		self.renderer.screen.save(self.image, "png")
765329
def setOverlayTextureBounds(self, ulOverlayHandle):
        """"""

        fn = self.function_table.setOverlayTextureBounds
        pOverlayTextureBounds = VRTextureBounds_t()
        result = fn(ulOverlayHandle, byref(pOverlayTextureBounds))
        return result, pOverlayTextureBounds
1122196
function () {

        for (var i = 0; i < this._textureAtlasNodes.length; i++) {
            this._textureAtlasNodes[i].clear();
        }

        this._currentNodeIdx = 0;

        this._zr.clear();
        this._coords = {};
    }
1279226
public GLShader prepareTexture(int tex, int tint) {
    // if our GL context has been lost and regained we may need to recreate our core; we don't
    // destroy the old core because the underlying resources are gone and destroying using our
    // stale handles might result in destroying someone else's newly created resources
    if (texEpoch != ctx.epoch()) {
      texCore = null;
    }
    // create our core lazily so that we ensure we're on the GL thread when it happens
    if (texCore == null) {
      createCore();
    }
    boolean justActivated = ctx.useShader(this);
    if (justActivated) {
      texCore.activate(ctx.curFbufWidth, ctx.curFbufHeight);
      if (GLContext.STATS_ENABLED) ctx.stats.shaderBinds++;
    }
    texCore.prepare(tex, tint, justActivated);
    return this;
  }
898543
public void setOverlayEnabled(boolean enabled) {
    if (enabled != this.enabled) {
      if (Build.VERSION.SDK_INT >= HONEYCOMB) {
        layerize(enabled);
      }
      this.enabled = enabled;

      if (!enabled) {
        canvasDelegate.clearCache();
      }

      invalidate(); // Trigger a re-draw so we see the grid.
    }
  }
615535
def close(self):
        ''''''
        h = self.gdx_handle
        gdxcc.gdxClose(h)
        gdxcc.gdxFree(h)