Project: titanium
Issue TIMOB-7246: iOS - Window Proxy does not get release if animated with callback
h3. The Problem: A window that has some type of animation with a callback function leaks. h3. Test case Open instruments and look for proxies while opening and closing the window in the following code sample: h3. Code {code} function Window1(){	var self = {};	var win = Ti.UI.createWindow();	var btn = Ti.UI.createButton({	title:'open',	left:20,	right:20,	height:44	});	btn.addEventListener('click', function(){	Window2().open();	});	win.add(btn);	self.open = win.open;	self.close = win.close;	return self; } function Window2(){	var self = {};	var win = Ti.UI.createWindow({	backgroundColor:'green'	});	// win.addEventListener('close', function(){	//	win = null; // this will make the window go away from memory, but not the items within	// });	win.addEventListener('open', function(){	win.animate({	left:10,	duration:300	}, function(){	Ti.API.info('complete');	});	});	var btn = Ti.UI.createButton({title:'close', left:20,right:20,height:44});	btn.addEventListener('click', function(){	win.close();	});	win.add(btn);	self.open = win.open;	self.close = win.close;	return self; } Window1().open(); {code}
Story points: 21