core/src/main/java/com/orientechnologies/common/directmemory/OByteBufferPool.java
public final void release(OPointer pointer) {
    if (TRACK) {
      pointerMapping.remove(pointer);
    }

    long poolSize = pointersPoolSize.incrementAndGet();
    if (poolSize > this.poolSize) {
      pointersPoolSize.decrementAndGet();
      allocator.deallocate(pointer);
    } else {
      pointersPool.add(pointer);
    }
  }
public final void release(OPointer pointer) {
    if (TRACK) {
      pointerMapping.remove(pointer);
    }

    long poolSize = pointersPoolSize.incrementAndGet();
    if (poolSize > this.poolSize) {
      pointersPoolSize.decrementAndGet();
      allocator.deallocate(pointer);
    } else {
      pointersPool.add(pointer);
    }
  }
public final void release ( OPointer pointer ) { if ( TRACK ) { pointerMapping . remove ( pointer ) ; } long poolSize = pointersPoolSize . incrementAndGet ( ) ; if ( poolSize > this . poolSize ) { pointersPoolSize . decrementAndGet ( ) ; allocator . deallocate ( pointer ) ; } else { pointersPool . add ( pointer ) ; } }
Put buffer which is not used any more back to the pool or frees direct memory if pool is full.

@param pointer Not used instance of buffer.

@see OGlobalConfiguration#DIRECT_MEMORY_POOL_LIMIT
Put buffer which is not used any more back to the pool or frees direct memory if pool is full .