提交 5b805bb5 编写于 作者: 杜庆泉's avatar 杜庆泉

3.8.9编译器 测试 onAppTrimMemory 功能完成

上级 bbea88dd
...@@ -89,10 +89,17 @@ ...@@ -89,10 +89,17 @@
}, },
testonMemoryWarning() { testonMemoryWarning() {
uni.onMemoryWarning(this.onMemoryWarning) uni.onMemoryWarning(this.onMemoryWarning)
uni.showToast({
icon:'none',
title:'已监听,注意控制台输出'
})
}, },
testoffMemoryWarning(){ testoffMemoryWarning(){
// uni.offMemoryWarning(this.onMemoryWarning) uni.offMemoryWarning(this.onMemoryWarning)
uni.offMemoryWarning() uni.showToast({
icon:'none',
title:'监听已移除'
})
}, },
testScreenShotListen() { testScreenShotListen() {
var that = this; var that = this;
......
...@@ -4,7 +4,6 @@ let listeners: UTSCallback[] = [] ...@@ -4,7 +4,6 @@ let listeners: UTSCallback[] = []
const onAppTrimMemoryListener = (res: number) => { const onAppTrimMemoryListener = (res: number) => {
listeners.forEach(listener => { listeners.forEach(listener => {
console.log("listener " + listener);
listener(res) listener(res)
}) })
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册