Home / Function/ teardown() — netty Function Reference

teardown() — netty Function Reference

Architecture documentation for the teardown() function in Http2FrameRoundtripTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  1f17b151_7510_46a5_ace6_1475a418a8c1["teardown()"]
  900e14d5_99d5_0a22_aeb4_72af4ffe3fca["Http2FrameRoundtripTest"]
  1f17b151_7510_46a5_ace6_1475a418a8c1 -->|defined in| 900e14d5_99d5_0a22_aeb4_72af4ffe3fca
  style 1f17b151_7510_46a5_ace6_1475a418a8c1 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-http2/src/test/java/io/netty/handler/codec/http2/Http2FrameRoundtripTest.java lines 124–143

    @AfterEach
    public void teardown() {
        try {
            // Release all of the buffers.
            for (ByteBuf buf : needReleasing) {
                buf.release();
            }
            // Now verify that all of the reference counts are zero.
            for (ByteBuf buf : needReleasing) {
                int expectedFinalRefCount = 0;
                if (buf.isReadOnly() || buf instanceof EmptyByteBuf) {
                    // Special case for when we're writing slices of the padding buffer.
                    expectedFinalRefCount = 1;
                }
                assertEquals(expectedFinalRefCount, buf.refCnt());
            }
        } finally {
            needReleasing.clear();
        }
    }

Domain

Subdomains

Frequently Asked Questions

What does teardown() do?
teardown() is a function in the netty codebase, defined in codec-http2/src/test/java/io/netty/handler/codec/http2/Http2FrameRoundtripTest.java.
Where is teardown() defined?
teardown() is defined in codec-http2/src/test/java/io/netty/handler/codec/http2/Http2FrameRoundtripTest.java at line 124.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free