我想知道是否可以杀死,在不需要创建的 webview 后关闭它。它有 4mb 的内存泄漏,我只是找不到杀死它的方法。
例如:
var webview = Titanium.UI.createWebView({
html:'hello world'
});
var win = Titanium.UI.currentWindow;
win.addEventListener('android:back', function(e){
win.remove(webview);
win.close();
});
但它不起作用。我仍然看到内存使用没有变化。有人可能知道解决方案吗?