Frees a previously returned texture
          It is safe to call this on a null ptr.
500828
def freeTexture(self):
        

        fn = self.function_table.freeTexture
        pTexture = RenderModel_TextureMap_t()
        fn(byref(pTexture))
        return pTexture
993210
public void unsetSbbContext() {
		this.sbbContext = null;
		this.tracer = null;
		this.timerFacility = null;
		this.nullACIFactory = null;
		this.nullActivityFactory = null;
		this.sipProvider = null;
	}
876129
def texture_from_image(renderer, image_name):
    """"""
    soft_surface = ext.load_image(image_name)
    texture = SDL_CreateTextureFromSurface(renderer.renderer, soft_surface)
    SDL_FreeSurface(soft_surface)
    return texture
1165689
function() {
		var gl = this.gl,
		      program = this.program;


		// initialize pixel textures
		this.bgTexture = createTexture( 0, "bgTexture" );
		this.spriteTexture = createTexture( 1, "spriteTexture" );
		this.prioTexture = createTexture( 2, "prioTexture" );

		// initialize palette texture
		this.paletteTexture = createTexture( 3, "paletteTexture" );
		gl.texImage2D( gl.TEXTURE_2D, 0, gl.RGB, 64, 1, 0, gl.RGB, gl.UNSIGNED_BYTE, palette );

		function createTexture( index, name ) {
			var texture = gl.createTexture();
			gl.bindTexture(gl.TEXTURE_2D, texture);

			gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
			gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);
			gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
			gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);

			gl.uniform1i(gl.getUniformLocation(program, name), index);

			return texture;
		}
	}
1009670
function () {
            this._super(me.Renderer, "reset");
            if (this.isContextValid === false) {
                // on context lost/restore
                this.compositor.init(this);
            } else {
                this.compositor.reset();
            }
            this.gl.disable(this.gl.SCISSOR_TEST);
            if (typeof this.fontContext2D !== "undefined" ) {
                this.createFontTexture(this.cache);
            }

        }
1374384
private void reclaimSpace()
    {
        if (_nameMap == null)
            return;

        if (_nameMap.size() > 0 && _nameMap.size() % _reclaimPoint == 0) {
            synchronized (_nameMap) {
                Set s = _nameMap.entrySet();
                Iterator it = s.iterator();
                while (it.hasNext()) {
                    Map.Entry e = (Map.Entry) it.next();

                    TrackingObject to = (TrackingObject) e.getValue();

                   // If the object has been reclaimed, then we remove the named object from the map.
                    WeakReference wr = to.getWeakINameable();
                    INameable o = (INameable) wr.get();
                    if (o == null) {
                        it.remove();
                    }

                }
                _reclaimPoint = _nameMap.size() + _reclaimIncrement;
             }
        }
    }
1262376
def cleanup(self):
        ""
        if self.m_glVertBuffer != 0:
            glDeleteBuffers(1, (self.m_glIndexBuffer,))
            glDeleteVertexArrays( 1, (self.m_glVertArray,) )
            glDeleteBuffers(1, (self.m_glVertBuffer,))
            self.m_glIndexBuffer = 0
            self.m_glVertArray = 0
            self.m_glVertBuffer = 0
682679
def load_texture(renderer, file):
    
    return Texture._from_ptr(check_ptr_err(lib.IMG_LoadTexture(renderer._ptr, file)))
699518
function() {
        this.removeBackBuffer();
        this.clearGrid();

        this.grid = null;
        this.tileSize = null;
        OpenLayers.Layer.HTTPRequest.prototype.destroy.apply(this, arguments); 
    }
752050
public void free()
    {
        m_strQueueName = null;
        m_strQueueType = null;
        m_source = null;
        m_mxProperties = null;
        m_intFilterID = null;
    }
1108038
private long freeMemory() {
    updatePeakMemoryUsed();
    long memoryFreed = 0;
    for (MemoryBlock block : allocatedPages) {
      memoryFreed += block.size();
      freePage(block);
    }
    allocatedPages.clear();
    currentPage = null;
    pageCursor = 0;
    return memoryFreed;
  }
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);
  }
760012
@Override public void close () {
    if (!disposed) {
      disposed = true;
      if (gfx.exec().isMainThread()) {
        gfx.gl.glDeleteTexture(id);
      } else {
        gfx.exec().invokeNextFrame(new Runnable() {
          public void run () { gfx.gl.glDeleteTexture(id); }
        });
      }
    }
  }
1336538
public boolean free(T value)
  {
    if (_freeRing.free(value))
      return true;
    else
      return _freeRingSoft.free(value);
  }
348611
function (renderer, size) {
        renderer.saveClear();
        var viewport = renderer.viewport;
        var x = 0, y = 0;
        var width = size || viewport.width / 4;
        var height = width;
        if (this.softShadow === ShadowMapPass.VSM) {
            this._outputDepthPass.material.define('fragment', 'USE_VSM');
        }
        else {
            this._outputDepthPass.material.undefine('fragment', 'USE_VSM');
        }
        for (var name in this._textures) {
            var texture = this._textures[name];
            renderer.setViewport(x, y, width * texture.width / texture.height, height);
            this._outputDepthPass.setUniform('depthMap', texture);
            this._outputDepthPass.render(renderer);
            x += width * texture.width / texture.height;
        }
        renderer.setViewport(viewport);
        renderer.restoreClear();
    }
305193
public void reload() {
    	Iterator texs = texturesLinear.values().iterator();
    	while (texs.hasNext()) {
    		((TextureImpl) texs.next()).reload();
    	}
    	texs = texturesNearest.values().iterator();
    	while (texs.hasNext()) {
    		((TextureImpl) texs.next()).reload();
    	}
    }
786120
void free() {
        if (c4enum != null) {
            synchronized (getDatabase().getLock()) {
                c4enum.close();
            }
            c4enum.free();
            c4enum = null;
        }
    }