public class UtlReferenceTracker extends Object
Reference tracking is enabled as follows:
Reference tracking is very expensive and should only be enabled when debugging reference counting issues.
This class IS NOT intended to be used by end users.
Modifier and Type | Class and Description |
---|---|
static interface |
UtlReferenceTracker.HasReferenceTracker
Marks an object as having a reference tracker.
|
Modifier and Type | Field and Description |
---|---|
static boolean |
ENABLED
True if reference tracking is globally enabled in the System.
|
static boolean |
TYPE_TRACKING_ENABLED
True if reference tracking is enabled for at least one type in the System.
|
Constructor and Description |
---|
UtlReferenceTracker(Object item) |
Modifier and Type | Method and Description |
---|---|
void |
dump() |
void |
dump(StringBuilder sb) |
static boolean |
enabled(Class<?> type)
Tests if reference tracking is enabled for the given type.
|
static boolean |
enabled(String typeName)
Tests if reference tracking is enabled for the given type.
|
void |
onAcquire(int newCount) |
void |
onDispose(int newCount) |
void |
onInit(int initCount) |
void |
onUndispose(int oldCount,
int initCount) |
void |
setAssociatedTracker(UtlReferenceTracker associatedTracker)
Sets a tracker associated with this tracker, for example a parent or child tracker.
|
public static final boolean ENABLED
public static final boolean TYPE_TRACKING_ENABLED
ENABLED
is set to true.public UtlReferenceTracker(Object item)
public final void onUndispose(int oldCount, int initCount)
public final void onInit(int initCount)
public final void onAcquire(int newCount)
public final void onDispose(int newCount)
public final void dump()
public final void dump(StringBuilder sb)
public void setAssociatedTracker(UtlReferenceTracker associatedTracker)
NOTE: Cycles of associations are not currently supported and will result in an infinite dump loop.
associatedTracker
- A tracker associated with this one.public static boolean enabled(Class<?> type)
type
- The type to check against for reference tracking.public static boolean enabled(String typeName)
typeName
- The type to check against for reference tracking.Copyright © 2019 Neeve Research, LLC. All Rights Reserved.