This API is used via wx.onMemoryWarning(function listener).
Attribute | Type | Description |
level | number | Memory warning level, only available on Android, corresponds to system macro definition. |
Valid Values | Description |
5 | TRIM_MEMORY_RUNNING_MODERATE |
10 | TRIM_MEMORY_RUNNING_LOW |
15 | TRIM_MEMORY_RUNNING_CRITICAL |
wx.onMemoryWarning(function () {console.log('onMemoryWarningReceive')})
This API is used via wx.offMemoryWarning(function listener).
const listener = function (res) { console.log(res) }wx.onMemoryWarning(listener)wx.offMemoryWarning(listener) // The same function object as the listener must be passed in.
Was this page helpful?
You can also Contact sales or Submit a Ticket for help.
Help us improve! Rate your documentation experience in 5 mins.
Feedback