Release all the particles owned by the specified emitter

@param emitter The emitter owning the particles that should be released
495445
public void releaseAll(ParticleEmitter emitter) {
		if( !particlesByEmitter.isEmpty() )
		{
			Iterator it= particlesByEmitter.values().iterator();
			while( it.hasNext())
			{
				ParticlePool pool= (ParticlePool)it.next();
				for (int i=0;i<pool.particles.length;i++) {
					if (pool.particles[i].inUse()) {
						if (pool.particles[i].getEmitter() == emitter) {
							pool.particles[i].setLife(-1);
							release(pool.particles[i]);
						}
					}
				}
			}
		}
	}
9489
@Override
    public void releaseBuffer ( byte[] buf ) {
        // better safe than sorry: prevent leaks if there is some out of bound access
        Arrays.fill(buf, (byte) 0);
        synchronized ( this.cache ) {
            if ( this.freeBuffers < this.cache.length ) {
                for ( int i = 0; i < this.cache.length; i++ ) {
                    if ( this.cache[ i ] == null ) {
                        this.cache[ i ] = buf;
                        this.freeBuffers++;
                        return;
                    }
                }
            }
        }
    }
245233
@Override
    public void release() {
        // Don't call IOUtils.release(in, null) or else could lead to infinite loop
        IOUtils.closeQuietly(this, null);
        InputStream in = getWrappedInputStream();
        if (in instanceof Releasable) {
            // This allows any underlying stream that has the close operation
            // disabled to be truly released
            Releasable r = (Releasable)in;
            r.release();
        }
    }
287874
@SuppressWarnings("unused")
    public void destroy() {
        // stop all workers
        for (KafkaMsgConsumerWorker worker : topicWorkers.values()) {
            try {
                worker.stopWorker();
            } catch (Exception e) {
                LOGGER.warn(e.getMessage(), e);
            }
        }
        topicWorkers.clear();

        // clear all message listeners
        synchronized (topicMsgListeners) {
            topicMsgListeners.clear();
        }

        // close all KafkaConsumer
        for (KafkaConsumer<String, byte[]> consumer : topicConsumers.values()) {
            synchronized (consumer) {
                try {
                    consumer.close();
                } catch (WakeupException e) {
                } catch (Exception e) {
                    LOGGER.warn(e.getMessage(), e);
                }
            }
        }
        topicConsumers.clear();

        if (executorService != null && myOwnExecutorService) {
            try {
                List<Runnable> tasks = executorService.shutdownNow();
            } catch (Exception e) {
                LOGGER.warn(e.getMessage(), e);
            } finally {
                executorService = null;
            }
        }
    }
860678
private static void remainLongest(Collection<Emit> collectedEmits)
    {
        if (collectedEmits.size() < 2) return;
        Map<Integer, Emit> emitMapStart = new TreeMap<Integer, Emit>();
        for (Emit emit : collectedEmits)
        {
            Emit pre = emitMapStart.get(emit.getStart());
            if (pre == null || pre.size() < emit.size())
            {
                emitMapStart.put(emit.getStart(), emit);
            }
        }
        if (emitMapStart.size() < 2)
        {
            collectedEmits.clear();
            collectedEmits.addAll(emitMapStart.values());
            return;
        }
        Map<Integer, Emit> emitMapEnd = new TreeMap<Integer, Emit>();
        for (Emit emit : emitMapStart.values())
        {
            Emit pre = emitMapEnd.get(emit.getEnd());
            if (pre == null || pre.size() < emit.size())
            {
                emitMapEnd.put(emit.getEnd(), emit);
            }
        }

        collectedEmits.clear();
        collectedEmits.addAll(emitMapEnd.values());
    }
1329342
private void release(boolean cleartargetstate) {
        if (mMediaPlayer != null) {
            mMediaPlayer.reset();
            mMediaPlayer.release();
            mMediaPlayer = null;
            mCurrentState = STATE_IDLE;
            if (cleartargetstate) {
                mTargetState  = STATE_IDLE;
            }
            if (mShouldRequestAudioFocus) {
                AudioManager am = (AudioManager) getContext().getApplicationContext().getSystemService(Context.AUDIO_SERVICE);
                am.abandonAudioFocus(null);
            }
        }
    }
1282709
function emit() {
  if (arguments.length) this.emitted.push(arguments);
  while (!this.paused && this.emitted.length && this.readable) {
    var emitArgs = this.emitted.shift();
    this.emit.apply(this, emitArgs);
    if (emitArgs[0] == 'end') {
      this.readable = false;
    }
  }
}
146638
public void release(Particle particle) {
		if (particle != dummy)
		{
			ParticlePool pool = (ParticlePool)particlesByEmitter.get( particle.getEmitter() );
			pool.available.add(particle);
		}
	}
840443
@Override
	public void release() {
		super.release();
		setTypeExpr(null);
		setSrcExpr(null);
		setUseRandomParamExpr(null);
		setAsyncExpr(null);
		setDeferExpr(null);
	}
50527
@Override
	public void onContainerClosed(EntityPlayer owner)
	{
		super.onContainerClosed(owner);
		getInventories().forEach(i -> i.removeOpenedContainer(this));
	}
469875
public void release(Throwable cause) {
		if (isReleased.compareAndSet(false, true)) {
			LOG.debug("{}: Releasing {}.", owningTaskName, this);

			// Set the error cause
			if (cause != null) {
				this.cause = cause;
			}

			// Release all subpartitions
			for (ResultSubpartition subpartition : subpartitions) {
				try {
					subpartition.release();
				}
				// Catch this in order to ensure that release is called on all subpartitions
				catch (Throwable t) {
					LOG.error("Error during release of result subpartition: " + t.getMessage(), t);
				}
			}
		}
	}
960555
protected  void emitWithBurstCheck(float[] particlePositions, float[] particleVelocities,
                         float[] particleTimeStamps)
    {
        if ( burstMode )
        {
            if ( executeOnce )
            {
                emit(particlePositions, particleVelocities, particleTimeStamps);
                executeOnce = false;
            }
        }
        else
        {
            emit(particlePositions, particleVelocities, particleTimeStamps);
        }

    }
1371782
@Override
	void releaseAllResources() throws IOException {
		if (isReleased.compareAndSet(false, true)) {

			// Gather all exclusive buffers and recycle them to global pool in batch, because
			// we do not want to trigger redistribution of buffers after each recycle.
			final List<MemorySegment> exclusiveRecyclingSegments = new ArrayList<>();

			synchronized (receivedBuffers) {
				Buffer buffer;
				while ((buffer = receivedBuffers.poll()) != null) {
					if (buffer.getRecycler() == this) {
						exclusiveRecyclingSegments.add(buffer.getMemorySegment());
					} else {
						buffer.recycleBuffer();
					}
				}
			}
			synchronized (bufferQueue) {
				bufferQueue.releaseAll(exclusiveRecyclingSegments);
			}

			if (exclusiveRecyclingSegments.size() > 0) {
				inputGate.returnExclusiveSegments(exclusiveRecyclingSegments);
			}

			// The released flag has to be set before closing the connection to ensure that
			// buffers received concurrently with closing are properly recycled.
			if (partitionRequestClient != null) {
				partitionRequestClient.close(this);
			} else {
				connectionManager.closeOpenChannelConnections(connectionId);
			}
		}
	}
445732
public void releaseAllResources()
    {
        synchronized (poolSynch)
        {
            Collection pools = poolMap.values();
            poolMap = new HashMap(poolMap.size());
            ObjectPool op = null;
            for (Iterator iterator = pools.iterator(); iterator.hasNext();)
            {
                try
                {
                    op = ((ObjectPool) iterator.next());
                    op.close();
                }
                catch (Exception e)
                {
                    log.error("Exception occured while closing pool " + op, e);
                }
            }
        }
        super.releaseAllResources();
    }
1362337
public void release() {

        this.parent = null;

        this.id = null;
        this.facesJspId = null;
        this.created = false;
        this.bodyContent = null;
        this.isNestedInIterator = false;
        _nextChildIndex = 0;
    }
521663
public void release() {
	parent = null;
	id = null;
	if( values != null ) {
	    values.clear();
	}
	values = null;
    }
266052
private void releaseAllChannelResources() {
		for (int i = 0; i < this.inputGates.size(); i++) {
			this.inputGates.get(i).releaseAllChannelResources();
		}

		for (int i = 0; i < this.outputGates.size(); i++) {
			this.outputGates.get(i).releaseAllChannelResources();
		}
	}