Removes the chunk layer (if exists) of the object (in memory)
10224
def remove_chunk_layer(self):
        
        if self.chunk_layer is not None:
            this_node = self.chunk_layer.get_node()
            self.root.remove(this_node)
            self.chunk_layer = None

        if self.header is not None:
            self.header.remove_lp('chunks')
1327645
public void removeLayer(Layer layer) {
		if (layers.contains(layer)) {
			layers.remove(layer);
			mapInfo.getLayers().remove(layer.getLayerInfo());
			handlerManager.fireEvent(new MapModelChangedEvent(this));
		}
	}
62110
function destroy(stack) {
  if (stack.length > 0) {
    for (const chunk of stack) {
      if (isTemplateResult(chunk)) {
        chunk.destroy(true);
      }
    }
  }
  stack.length = 0;
}
1305758
public void cleanup() {
    htDictionary.clear();
    memoryEstimate.decrementTotalMemory(byteArray.getSizeInBytes());
    memoryEstimate.decrementTotalMemory(getSizeOfIntArrays());
    memoryEstimate.decrementDictionaryMemory(byteArray.size());
  }
320681
function cleanupProxyOnDestroy (object) {
      if (api.mediaCapturer && api.mediaCapturer.id === object.id) {
        api.mediaCapturer = null;
      }
      else if (proxies.hasOwnProperty(object.id)) {
        delete proxies[object.id];
      }

      if (object.$) {
        object.$.remove();
      }
    }
719255
public void clear(String layerName) {
        synchronized (this) {
            log.info("clearing cache for layer " + layerName);
            for (String key : cache.keySet()) {
                if (key.contains(layerName))
                    remove(key);
            }
        }
    }
599983
def _teardown(self):
        '''
        
        '''
        if not self._was_object_method:
            setattr(self._instance, self._attr, self._obj)
        else:
            delattr(self._instance, self._attr)
769982
def clear(self):
        """"""
        self._imgobj = None
        try:
            # See if there is an image on the canvas
            self.canvas.delete_object_by_tag(self._canvas_img_tag)
            self.redraw()
        except KeyError:
            pass
1227500
function() {
        /**
         * We have to override this method because the event pane destroy
         * deletes the mapObject reference before removing this layer from
         * the map.
         */
        if (this.map) {
            this.setGMapVisibility(false);
            var cache = OpenLayers.Layer.Google.cache[this.map.id];
            if (cache && cache.count <= 1) {
                this.removeGMapElements();
            }            
        }
        OpenLayers.Layer.EventPane.prototype.destroy.apply(this, arguments);
    }
1316543
def ChunkBy(self, f=None):
    
    if f is None:
        return _chunk(self)
    if is_to_destruct(f):
        f = destruct_func(f)
    return _chunk(self, f)
356879
def remove(self, index):
        """"""
        assert index < self.count
        last_index = self.count - 1
        data = self.get(index)

        if index == last_index:
            # easy case - nothing to do except zero last chunk
            last_data = data
            moved = None
        else:
            last_data = self.get(last_index)
            # copy the last chunk's data over the data to be deleted
            data[0:self.chunk_size] = last_data
            moved = last_index

        # zero last chunk's data
        last_data[0:self.chunk_size] = [0] * self.chunk_size
        self.count -= 1

        # provide which index has now moved
        return moved
7852
function() {
        this.mapObject = null;
        this.pane = null;
        OpenLayers.Layer.prototype.destroy.apply(this, arguments); 
    }
728334
function() {
        if (this.map) {
            this.map.events.un({
                "removelayer": this.handleMapEvents,
                "changelayer": this.handleMapEvents,
                scope: this
            });
        }
        this.layer = null;
        OpenLayers.Control.prototype.destroy.apply(this, []);
    }
257042
function _cleanObject (memo, value, key) {
  if (_hasData(value)) {
    memo[key] = value._data.data;
  } else if (_.isArray(value)) {
    memo[key] = _.reduce(value, _cleanArray, []);
  } else {
    memo[key] = value;
  }
  return memo;
}
390008
def _handle_tag_removeobject(self):
        """"""
        obj = _make_object("RemoveObject")
        obj.CharacterId = unpack_ui16(self._src)
        obj.Depth = unpack_ui16(self._src)
        return obj
227979
function() {
        if (this.layers || this.map) {
            var i, layers = this.layers || this.map.layers;
            for (i=layers.length-1; i>=0; --i) {
                this.removeLayer({layer: layers[i]});
            }
        }
        if (this.map) {
            this.map.events.un({
                addlayer: this.addLayer,
                removeLayer: this.removeLayer,
                scope: this
            });
        }
        OpenLayers.Control.prototype.destroy.apply(this, arguments);
    }
1332820
def remove(self, sound):
        
        with self.chunk_available:
            sound.playing = False
            self.sounds.remove(sound)