Deletes the segment.
324175
public void delete() {
    Buffer buffer = this.buffer instanceof SlicedBuffer ? ((SlicedBuffer) this.buffer).root() : this.buffer;
    if (buffer instanceof FileBuffer) {
      ((FileBuffer) buffer).delete();
    } else if (buffer instanceof MappedBuffer) {
      ((MappedBuffer) buffer).delete();
    }

    offsetIndex.delete();
  }
920618
def removeSegmentUpdate(self, updateInfo):
    

    # An updateInfo contains (creationDate, SegmentUpdate)
    (creationDate, segUpdate) = updateInfo

    # Key is stored in segUpdate itself...
    key = (segUpdate.columnIdx, segUpdate.cellIdx)

    self.segmentUpdates[key].remove(updateInfo)
1251799
public synchronized Segment nextSegment() throws IOException {
        Segment seg = nextSegment(false);
        
        // Remove the writer segment index buffer file.
        File sibFile = getSegmentIndexBufferFile(seg.getSegmentId());
        if(sibFile.exists()) {
            sibFile.delete();
        }
        
        return seg;
    }
1215692
protected void evict() {
        for (int i = 0, len = _segments.length; i < len; i++) {
            if (_segments[i].blockBitSet.isEmpty()) {
                final Deque<Segment> queue = _segmentQueueMap.get(i);

                if (queue != null) {
                    synchronized (queue) {
                        if (_segments[i].blockBitSet.isEmpty()) {
                            synchronized (_segmentBitSet) {
                                queue.remove(_segments[i]);

                                _segmentQueueMap.remove(i);
                                _segmentBitSet.clear(i);
                            }
                        }
                    }
                }
            }
        }
    }
479439
def clear(self):
        
        for _, frame in self._segments.items():
            frame.configure(background=self._bg_color)
762703
private void clearInternal(boolean clearMeta) {
        // Close all known segments
        for(int segId = 0, cnt = _segList.size(); segId < cnt; segId++) {
            Segment seg = _segList.get(segId);
            if(seg != null) {
                try {
                    if(seg.getMode() == Segment.Mode.READ_WRITE) {
                        seg.force();
                    }
                    seg.close(false);
                } catch (IOException e) {
                    _log.warn("failed to close segment " + seg.getSegmentId());
                } finally {
                    _segList.set(segId, null);
                }
            }
        }
        
        if(clearMeta) {
            try {
                updateMeta();
            } catch (IOException e) {
                _log.warn("failed to clear segment meta");
            }
        }
        
        _segList.clear();
        _recycleList.clear();
    }
1100056
private void discardSegment(final CommitLogSegment segment, final boolean deleteFile)
    {
        logger.debug("Segment {} is no longer active and will be deleted {}", segment, deleteFile ? "now" : "by the archive script");
        size.addAndGet(-DatabaseDescriptor.getCommitLogSegmentSize());

        segmentManagementTasks.add(new Callable<CommitLogSegment>()
        {
            public CommitLogSegment call()
            {
                segment.close();
                if (deleteFile)
                    segment.delete();
                return null;
            }
        });
    }
1046932
public boolean remove(SegmentIndexBuffer sib) {
        if(sib == null) {
            return false;
        }
        
        _sibLookup.remove(sib.getSegmentId());
        return true;
    }
546724
private synchronized void resetCurrentSegment() {
    JournalSegment<E> lastSegment = getLastSegment();
    if (lastSegment != null) {
      currentSegment = lastSegment;
    } else {
      JournalSegmentDescriptor descriptor = JournalSegmentDescriptor.builder()
          .withId(1)
          .withIndex(1)
          .withMaxSegmentSize(maxSegmentSize)
          .withMaxEntries(maxEntriesPerSegment)
          .build();

      currentSegment = createSegment(descriptor);

      segments.put(1L, currentSegment);
    }
  }
539278
def removeSegment(self, segment, preserveCurve=False):
        
        if not isinstance(segment, int):
            segment = self.segments.index(segment)
        segment = normalizers.normalizeIndex(segment)
        if segment >= self._len__segments():
            raise ValueError("No segment located at index %d." % segment)
        preserveCurve = normalizers.normalizeBoolean(preserveCurve)
        self._removeSegment(segment, preserveCurve)
970242
public void removeLRU() {
        int removeCount = (int) Math.max((size() * trimFactor), 1);

        Iterator<Map.Entry<K, V>> entries = entrySet().iterator();
        while ((removeCount--) > 0 && entries.hasNext()) {
            entries.next();
            entries.remove();
        }
    }
817888
protected boolean removeSegment(int segmentIndex) {
		if ((this.values == null) || (segmentIndex < 0)
				|| (segmentIndex >= this.values.length - 1)) {
			return false;
		}

		if (this.values.length == 2) {
			this.values = null;
			this.size = 0;
		} else {
			final int count = this.values[segmentIndex + 1] - this.values[segmentIndex] + 1;
			final int[] newTab = new int[this.values.length - 2];
			System.arraycopy(this.values, 0, newTab, 0, segmentIndex);
			System.arraycopy(this.values, segmentIndex + 2, newTab, segmentIndex, this.values.length - segmentIndex);
			this.values = newTab;
			this.size -= count;
		}

		return true;
	}
203321
@Override
   public void clear(IntSet segments) {
      IntSet extraSegments = null;
      PrimitiveIterator.OfInt iter = segments.iterator();
      // First try to just clear the respective maps
      while (iter.hasNext()) {
         int segment = iter.nextInt();
         ConcurrentMap<K, InternalCacheEntry<K, V>> map = maps.get(segment);
         if (map != null) {
            map.clear();
         } else {
            // If we don't have a map for a segment we have to later go through the unowned segments and remove
            // those entries separately
            if (extraSegments == null) {
               extraSegments = IntSets.mutableEmptySet(segments.size());
            }
            extraSegments.set(segment);
         }
      }

      if (extraSegments != null) {
         IntSet finalExtraSegments = extraSegments;
         nonOwnedEntries.keySet().removeIf(k -> finalExtraSegments.contains(getSegmentForKey(k)));
      }
   }
9346
function() {
        var index = this.line.geometry.components.length - 1;
        this.line.geometry.removeComponent(this.line.geometry.components[index]);
        this.removePoint();
        this.finalize();
    }
1297124
def delete(self):
        """"""
        if lib.EnvDeleteInstance(self._env, self._ist) != 1:
            raise CLIPSError(self._env)
1101206
def delete_before(self, segment_info):
        

        # This will delete all base backup data before segment_info.
        self._delete_base_backups_before(segment_info)

        # This will delete all WAL segments before segment_info.
        self._delete_wals_before(segment_info)

        if self.deleter:
            self.deleter.close()
847946
public function delete()
    {
        if ( ! is_null($this->parent)) {
            $this->parent->removeChild($this->id);
        }
        $this->parent->clear();
        $this->clear();
    }