Pool (Apache Tomcat 11.0.24 API Documentation)
Description: declaration: package: org.apache.tomcat.jni, class: Pool

# 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()`
  Default constructor required by JNI.

- ## Method Summary

  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 Object

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

- ## Constructor Details

  - ### Pool

    public Pool()
    Default constructor required by JNI.

- ## Method Details

  - ### 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