Trigger GC and drop compiled code on low memory

Reviewed By: astreet

Differential Revision: D2658693

fb-gh-sync-id: 8cba49b67ac45a2dbf8b4c9c404d6fb9c97693f6
This commit is contained in:
Alexander Blom
2015-12-07 08:43:24 -08:00
committed by facebook-github-bot-5
parent 611e0619ca
commit 510d50fc17
12 changed files with 182 additions and 3 deletions

View File

@@ -314,6 +314,11 @@ public class CatalystInstanceImpl implements CatalystInstance {
return mJavaRegistry.getAllModules();
}
@Override
public void handleMemoryPressure(MemoryPressure level) {
Assertions.assertNotNull(mBridge).handleMemoryPressure(level);
}
/**
* Adds a idle listener for this Catalyst instance. The listener will receive notifications
* whenever the bridge transitions from idle to busy and vice-versa, where the busy state is