Announcement: Tencent Cloud Mini Program Platform Renamed to Tencent Cloud Super App as a Service on January 2, 2025
Console Updates
Android SDK Updates
iOS SDK Updates
Flutter SDK Updates
IDE Updates
Base Library Updates
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