@Beta
@Deprecated
public final class AndroidMemorySensitiveReferenceManager
extends java.lang.Object
ReleaseReferencesAt
scopes in
low-memory conditions.
In order to release references in low-memory conditions, inject an AndroidMemorySensitiveReferenceManager
into your Application
and delegate
Application.onTrimMemory(int)
to it.
For example:
class MyApplication extends Application { @Inject AndroidMemorySensitiveReferenceManager manager; public void onTrimMemory(int level) { manager.onTrimMemory(level); } }
Modifier and Type | Method and Description |
---|---|
void |
onTrimMemory(int level)
Deprecated.
Releases references for
ReleaseReferencesAt scopes whose ReleaseReferencesAt.value() is less than or equal to level . |
public void onTrimMemory(int level)
ReleaseReferencesAt
scopes whose ReleaseReferencesAt.value()
is less than or equal to level
. Restores references for
scopes whose ReleaseReferencesAt.value()
is greater than level
.Application.onTrimMemory(int)