com.opensymphony.xwork2.inject.util

## Class FinalizableReferenceQueue

- java.lang.Object
- - java.lang.ref.ReferenceQueue<Object>
  - - com.opensymphony.xwork2.inject.util.FinalizableReferenceQueue

-     public class FinalizableReferenceQueue
      extends ReferenceQueue<Object>

  Starts a background thread that cleans up after reclaimed referents.
  Author:
    Bob Lee (crazybob@google.com)

- - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static ReferenceQueue<Object>` | `getInstance()` Gets instance.
    `static void` | `stopAndClear()` Stops the background drain thread and releases the singleton instance, preventing the webapp classloader from being pinned after undeploy.

    - ### Methods inherited from class java.lang.ref.ReferenceQueue

      `poll, remove, remove`

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

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

- - ### Method Detail

    - #### stopAndClear

          public static void stopAndClear()

      Stops the background drain thread and releases the singleton instance, preventing the webapp classloader from being pinned after undeploy.

    - #### getInstance

          public static ReferenceQueue<Object> getInstance()

      Gets instance.

Copyright © 2000–2026 Apache Software Foundation. All rights reserved.