mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Delete RCTConstants.RCTGetMemoryPressureUnloadLevel (#47297)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/47297 In this diff I'm proposing to remove configuration for RCTConstants.RCTGetMemoryPressureUnloadLevel API in iOS changelog: [iOS][Breaking] Delete experimental API RCTConstants.RCTGetMemoryPressureUnloadLevel Reviewed By: rubennorte, philIip Differential Revision: D65181556 fbshipit-source-id: c435bec6ed03562b53f1924add7b69ab517b190b
This commit is contained in:
committed by
Facebook GitHub Bot
parent
8bd1f3fbfa
commit
d79dc48abd
@@ -50,9 +50,3 @@ RCT_EXTERN NSString *const RCTDidInitializeModuleNotification;
|
||||
*/
|
||||
RCT_EXTERN BOOL RCTGetDispatchW3CPointerEvents(void);
|
||||
RCT_EXTERN void RCTSetDispatchW3CPointerEvents(BOOL value);
|
||||
|
||||
/*
|
||||
* Memory Pressure Unloading Level
|
||||
*/
|
||||
RCT_EXTERN int RCTGetMemoryPressureUnloadLevel(void);
|
||||
RCT_EXTERN void RCTSetMemoryPressureUnloadLevel(int value);
|
||||
|
||||
@@ -38,19 +38,3 @@ void RCTSetDispatchW3CPointerEvents(BOOL value)
|
||||
{
|
||||
RCTDispatchW3CPointerEvents = value;
|
||||
}
|
||||
|
||||
/*
|
||||
* Memory Pressure Unloading Level for experimentation only.
|
||||
* Default is 15, which is TRIM_MEMORY_RUNNING_CRITICAL.
|
||||
*/
|
||||
static int RCTMemoryPressureUnloadLevel = 15;
|
||||
|
||||
int RCTGetMemoryPressureUnloadLevel(void)
|
||||
{
|
||||
return RCTMemoryPressureUnloadLevel;
|
||||
}
|
||||
|
||||
void RCTSetMemoryPressureUnloadLevel(int value)
|
||||
{
|
||||
RCTMemoryPressureUnloadLevel = value;
|
||||
}
|
||||
|
||||
@@ -371,7 +371,8 @@ struct RCTInstanceCallback : public InstanceCallback {
|
||||
// in case if some other tread resets it.
|
||||
auto reactInstance = _reactInstance;
|
||||
if (reactInstance) {
|
||||
int unloadLevel = RCTGetMemoryPressureUnloadLevel();
|
||||
// Memory Pressure Unloading Level 15 represents TRIM_MEMORY_RUNNING_CRITICAL.
|
||||
int unloadLevel = 15;
|
||||
reactInstance->handleMemoryPressure(unloadLevel);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user