Deletes this texture's GPU resources and renders it unusable.
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); }
        });
      }
    }
  }
917811
public void destroy() {
    context.removeVisualizationListener(this);
    context.removeResultListener(this);
    for(Entry<VisualizationTask, Visualization> v : taskmap.entrySet()) {
      Visualization vis = v.getValue();
      if(vis != null) {
        vis.destroy();
      }
    }
    taskmap.clear();
  }
712201
function discardLayer(item) {
  if (confirm('Remove this layer?')) {
    scene.destroyLayer(item.layer);
    layers.remove(item);
  }
}
825460
function destroy() {
        Parallax._parallaxes.splice(Parallax._parallaxes.indexOf(this), 1);
        this.$img[0].style.transform = '';
        this._removeEventHandlers();

        this.$el[0].M_Parallax = undefined;
      }
1310517
function destroy() {
         me.pool.push(this.color);
         this.color = undefined;

         this._super(me.Renderable, "destroy");
       }
1066197
private void clearBackBuffer() {
        // Manually clear the backbuffer
        if(backbuffer != null) {
            Graphics2D graphics = backbuffer.createGraphics();
            Color backgroundColor = colorConfiguration.toAWTColor(TextColor.ANSI.DEFAULT, false, false);
            graphics.setColor(backgroundColor);
            graphics.fillRect(0, 0, getWidth(), getHeight());
            graphics.dispose();
        }
    }
1181490
def remove(self, visualization):
        
        res = self.es.delete(index=self.index, id=visualization.id, doc_type=self.doc_type, refresh=True)
        return res
523440
function destroy() {
         // allow recycling object properties
         me.pool.push(this.currentTransform);
         this.currentTransform = undefined;
         me.pool.push(this.anchorPoint);
         this.anchorPoint = undefined;
         me.pool.push(this.pos);
         this.pos = undefined;
         me.pool.push(this._absPos);
         this._absPos = undefined;
         me.pool.push(this._bounds);
         this._bounds = undefined;
         this.onVisibilityChange = undefined;

         if (typeof this.mask !== "undefined") {
           me.pool.push(this.mask);
           this.mask = undefined;
         }

         if (typeof this.tint !== "undefined") {
           me.pool.push(this.tint);
           this.tint = undefined;
         }

         this.ancestor = undefined; // destroy the physic body if defined

         if (typeof this.body !== "undefined") {
           this.body.destroy.apply(this.body, arguments);
           this.body = undefined;
         }

         this.onDestroyEvent.apply(this, arguments);
       }
506113
function() {
		if (this.id && this.gl)
			this.gl.deleteTexture(this.id);
		if (this.context)
			this.context.removeManagedObject(this);
		this.width = this.height = 0;
		this.id = null;
		this.managedArgs = null;
		this.context = null;
		this.gl = null;
	}
417154
function() {
        var t;
        for (var i = 0; i < this.bound_textures.length; i++) {
            t = this.bound_textures[i];
            t.unbind();
        }
        this.bound_textures = [];
        this.active = null;
    }
322105
function destroy() {
        this._removeEventHandlers();
        this.el.M_Materialbox = undefined;

        // Unwrap image
        $(this.placeholder).after(this.el).remove();

        this.$el.removeAttr('style');
      }
171693
def clear(options = {})
      options = {
          color: [0.0, 0.0, 0.0, 0.0],
      }.merge! options

      color = options[:color]
      color = color.to_opengl if color.is_a? Gosu::Color

      Gl.glBindFramebufferEXT Gl::GL_FRAMEBUFFER_EXT, fbo_id unless rendering?

      Gl.glDisable Gl::GL_BLEND # Need to replace the alpha too.
      Gl.glClearColor(*color)
      Gl.glClear Gl::GL_COLOR_BUFFER_BIT | Gl::GL_DEPTH_BUFFER_BIT
      Gl.glEnable Gl::GL_BLEND

      Gl.glBindFramebufferEXT Gl::GL_FRAMEBUFFER_EXT, 0 unless rendering?

      nil
    end
48917
function destroy() {
        this.el.style.top = null;
        this._removePinClasses();
        this._removeEventHandlers();

        // Remove pushpin Inst
        var index = Pushpin._pushpins.indexOf(this);
        Pushpin._pushpins.splice(index, 1);
      }
405263
def _clear(self):
        
        draw = ImageDraw.Draw(self._background_image)
        draw.rectangle(self._device.bounding_box,
                       fill="black")
        del draw
1040944
private void flushBuffer() {	
		if (vertIndex == 0) {
			return;
		}
		if (currentType == NONE) {
			return;
		}
		
		if (vertIndex < TOLERANCE) {
			GL11.glBegin(currentType);
			for (int i=0;i<vertIndex;i++) {
				GL11.glColor4f(cols[(i*4)+0], cols[(i*4)+1], cols[(i*4)+2], cols[(i*4)+3]);
				GL11.glTexCoord2f(texs[(i*2)+0], texs[(i*2)+1]);
				GL11.glVertex3f(verts[(i*3)+0], verts[(i*3)+1], verts[(i*3)+2]);
			}
			GL11.glEnd();
			currentType = NONE;
			return;
		}
		vertices.clear();
		colors.clear();
		textures.clear();
		
		vertices.put(verts,0,vertIndex*3);
		colors.put(cols,0,vertIndex*4);
		textures.put(texs,0,vertIndex*2);
		
		vertices.flip(); 
		colors.flip(); 
		textures.flip(); 
		
		GL11.glVertexPointer(3,0,vertices);     
		GL11.glColorPointer(4,0,colors);     
		GL11.glTexCoordPointer(2,0,textures);     
		
		GL11.glDrawArrays(currentType, 0, vertIndex);
		currentType = NONE;
	}
940520
protected final void emptyLTrash() {
    if (_lVecTrash.isEmpty()) return;
    Futures fs = new Futures();
    cleanupTrash(_lVecTrash, fs);
    fs.blockForPending();
  }
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