复制 Markdown查看 MarkdownoffMemoryWarning(listener: Function)版本要求:BaseKit≥2.3.2@ray-js/ray≥0.3.23支持平台:iOSAndroidPromise该方法支持 Promise 调用,不传 success / fail / complete 回调时返回 Promiseimport { offMemoryWarning } from '@ray-js/ray'; // Promise 调用 try { const res = await offMemoryWarning({ ...params }); console.log(res); } catch (err) { console.log(err.errorMsg); }描述取消监听内存不足告警事件。参数参数类型必填说明›listener(params: Object↓) => void是返回值无示例代码import { onMemoryWarning, offMemoryWarning } from '@ray-js/ray' // 取消监听内存告警:需先注册 listener,再传入同一个 listener 精确取消 const listener = e => console.log(e); onMemoryWarning(listener); offMemoryWarning(listener);上一页onMemoryWarning下一页图片