public abstract static class MemoryCleaner.Cleaner extends Object
Modifier and Type | Field and Description |
---|---|
long |
id |
Constructor and Description |
---|
Cleaner() |
Modifier and Type | Method and Description |
---|---|
void |
addRef() |
boolean |
clean(boolean logErrorIfNotClean)
Clean up any resources not previously released.
|
protected abstract boolean |
cleanImpl(boolean logErrorIfNotClean)
Clean up any resources not previously released.
|
void |
delRef() |
abstract boolean |
isClean()
Check if the underlying memory has been cleaned up or not.
|
boolean |
isLeakExpected()
Return true if a leak is expected for this object else false.
|
void |
logRefCountDebug(String message) |
void |
noWarnLeakExpected() |
public final void addRef()
public final void delRef()
public final void logRefCountDebug(String message)
public final boolean clean(boolean logErrorIfNotClean)
logErrorIfNotClean
- if true we should log a leak unless it is expected.public final boolean isLeakExpected()
protected abstract boolean cleanImpl(boolean logErrorIfNotClean)
logErrorIfNotClean
- if true and there are resources to clean up a leak has happened
so log it.public void noWarnLeakExpected()
public abstract boolean isClean()
Copyright © 2024. All rights reserved.