Example usage for io.netty.util ReferenceCounted release

List of usage examples for io.netty.util ReferenceCounted release

Introduction

In this page you can find the example usage for io.netty.util ReferenceCounted release.

Prototype

boolean release(int decrement);

Source Link

Document

Decreases the reference count by the specified decrement and deallocates this object if the reference count reaches at 0 .

Usage

From source file:io.grpc.alts.internal.NettyTsiHandshakerTest.java

License:Apache License

@After
public void teardown() {
    for (ReferenceCounted reference : references) {
        reference.release(reference.refCnt());
    }
}

From source file:org.lanternpowered.server.network.message.ReferenceCountedMessage.java

License:MIT License

@Override
public boolean release(int decrement) {
    final ReferenceCounted referenceCounted = getReferenceCounted();
    return referenceCounted == null || referenceCounted.release(decrement);
}