### YamlMime:JavaType uid: "com.azure.core.util.ReferenceManager" fullName: "com.azure.core.util.ReferenceManager" name: "ReferenceManager" nameWithType: "ReferenceManager" summary: "This interface represents managing references to and providing the ability to run a cleaning operation once the object is no longer able to be reference." syntax: "public interface ReferenceManager" fields: - uid: "com.azure.core.util.ReferenceManager.INSTANCE" fullName: "com.azure.core.util.ReferenceManager.INSTANCE" name: "INSTANCE" nameWithType: "ReferenceManager.INSTANCE" summary: "The global instance of that should be used to maintain object references." modifiers: - "static" - "final" field: type: "" syntax: "public static final ReferenceManager INSTANCE" desc: "The global instance of that should be used to maintain object references." methods: - uid: "com.azure.core.util.ReferenceManager.register(java.lang.Object,java.lang.Runnable)" fullName: "com.azure.core.util.ReferenceManager.register(Object object, Runnable cleanupAction)" name: "register(Object object, Runnable cleanupAction)" nameWithType: "ReferenceManager.register(Object object, Runnable cleanupAction)" summary: "Registers the `object` and the cleaning action to run once the object becomes phantom reachable." modifiers: - "abstract" parameters: - description: "The object to monitor." name: "object" type: "Object" - description: "The cleanup action to perform when the object becomes phantom reachable." name: "cleanupAction" type: "Runnable" syntax: "public abstract void register(Object object, Runnable cleanupAction)" desc: "Registers the `object` and the cleaning action to run once the object becomes phantom reachable.\n\nThe `cleanupAction` cannot have a reference to the `object`, otherwise the object will never be able to become phantom reachable.\n\nExceptions thrown by `cleanupAction` are ignored." type: "interface" desc: "This interface represents managing references to and providing the ability to run a cleaning operation once the object is no longer able to be reference.\n\nExpected usage of this is through ." metadata: {} package: "com.azure.core.util" artifact: com.azure:azure-core:1.32.0