Pool (Apache Tomcat 10.1.2 API Documentation)

Package org.apache.tomcat.jni

## Class Pool

- java.lang.Object
- - org.apache.tomcat.jni.Pool

-     public class Pool
      extends Object

  Provides access to APR memory pools which are used to manage memory allocations for natively created instances.

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `Pool()` |

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `static long` | `create​(long parent)` | Create a new pool.
    `static void` | `destroy​(long pool)` | Destroy the pool.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### Pool

          public Pool()

  - ### Method Detail

    - #### create

          public static long create​(long parent)

      Create a new pool.
      Parameters:
        `parent` - The parent pool. If this is 0, the new pool is a root pool. If it is non-zero, the new pool will inherit all of its parent pool's attributes, except the apr_pool_t will be a sub-pool.
      Returns:
        The pool we have just created.

    - #### destroy

          public static void destroy​(long pool)

      Destroy the pool. This takes similar action as apr_pool_clear() and then frees all the memory. This will actually free the memory.
      Parameters:
        `pool` - The pool to destroy