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 Details

    • Pool

      public Pool()
  • 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