我几乎没有使用钛合金的经验。基本上我需要主/详细的应用程序一样的演示版本在git或在示例钛工作室
这是我认为有漏水的部分
masterView.addEventListener('itemSelected', function(e) {
//create detail view container
var detailView = new DetailView();
var detailContainerWindow = Ti.UI.createWindow({
title:'Product Details',
navBarHidden:false,
backgroundColor:'#ffffff'
});
detailContainerWindow.add(detailView);
detailView.fireEvent('itemSelected',e);
detailContainerWindow.open();
});从逻辑上讲,每次表行单击时,都应该创建一个详细视图,并在按下back按钮时销毁该视图。但在android设备上进行了测试..每点击一次表视图,此应用程序占用的内存都会增加。我认为钛每次都会采用新的细节视图,但不会破坏旧的在后端运行的视图。如果是bug或者我弄错了,请告诉我。
发布于 2012-04-13 09:04:34
我已经找到了解决我所有记忆问题的方法:
var memPool = Ti.UI.createWindow();
memPool.open();
memPool.hide();
memPool.add(yourTrashView);
memPool.close();在这里解释:
http://developer.appcelerator.com/question/116867/this-is-a-solution-to-your-memory-woes
https://stackoverflow.com/questions/10071535
复制相似问题