Project: titanium
Issue TIMOB-19891: Android: Memory Leak on Window
I open some windows and then close all one by one except first one. In 4.1.0.GA more then one WindowProxy object remain in memory but must only one. In 3.5.1.GA remain two objects. In the iphone only first one. {code:javascript} (function openWindow(n) { var win = Ti.UI.createWindow({ backgroundColor : "#aaaaaa", layout : "vertical" }); win.title = "Window # " + n; var label = Ti.UI.createLabel({ text : "Window # " + n, color : "#ffffff", top : 20 }); win.add(label); var openButton = Ti.UI.createButton({ title : "Open", color : "#ffffff", top : 20 }); openButton.addEventListener('click', function onOpenByButton(evt) { openWindow(n + 1); }); win.add(openButton); var closeButton = Ti.UI.createButton({ title : "Close", color : "#ffffff", top : 20 }); closeButton.addEventListener('click', function onCloseByButton(evt) { win.close(); win = null; }); win.add(closeButton); win.open(); })(1); {code} May be related to this changes https://github.com/appcelerator/titanium_mobile/commit/2b12ad61775920f8045e168ae678ce123dfa14b4#diff-034a9360d01584987d9c951c0a215f65 !memoryleak.png|thumbnail!
Story points: 5