flink-instrumentation/workspace/flink-1.4.1-instrumented/flink-1.4.1/flink-runtime/src/main/java/org/apache/flink/runtime/io/network/buffer/LocalBufferPool.java
/**
	 * Destroy is called after the produce or consume phase of a task finishes.
	 */
Destroy is called after the produce or consume phase of a task finishes.
Destroy is called after the produce or consume phase of a task finishes .
@Override
	public void lazyDestroy() {
		synchronized (availableMemorySegments) {
			if (!isDestroyed) {
				MemorySegment segment;
				while ((segment = availableMemorySegments.poll()) != null) {
					returnMemorySegment(segment);
				}
				BufferListener listener;
				while ((listener = registeredListeners.poll()) != null) {
					listener.notifyBufferDestroyed();
				}
				isDestroyed = true;
			}
		}
		networkBufferPool.destroyBufferPool(this);
	}
@ Override public void lazyDestroy ( ) { synchronized ( availableMemorySegments ) { if ( ! isDestroyed ) { MemorySegment segment ; while ( ( segment = availableMemorySegments . poll ( ) ) != null ) { returnMemorySegment ( segment ) ; } BufferListener listener ; while ( ( listener = registeredListeners . poll ( ) ) != null ) { listener . notifyBufferDestroyed ( ) ; } isDestroyed = true ; } } networkBufferPool . destroyBufferPool ( this ) ; }
Destroy is called after the produce or consume phase of a task finishes.
Destroy is called after the produce or consume phase of a task finishes .