[AC-418] TiUIView Leaking when being animated on click inside scrollable view.
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Resolved |
Resolution | Cannot Reproduce |
Resolution Date | 2015-11-10T05:53:08.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | n/a |
Labels | n/a |
Reporter | Yaovi Kwasi |
Assignee | Mostafizur Rahman |
Created | 2015-08-28T00:55:34.000+0000 |
Updated | 2015-11-25T17:21:56.000+0000 |
Description
TiUIView Leaking when being animated on click inside scrollable view.
This does not occur with the 3.4.1 SDK.
the animation is the cause of the leak on SDK 3.5.1 above.
without animation there is no leak
sample code : App.js
var isSet= false;
function doClick() {
if (!isSet) {
bt.hide();
scView.addView(myView);
isSet = true;
}
}
function imageClick() {
var matrix = Ti.UI.create2DMatrix();
matrix = matrix.scale(.9, .9);
animView.animate({
transform: matrix,
duration: 100,
autoreverse: true,
repeat: 1
}, function() {
bt.show();
_.each(scView.views, function(view) {
scView.removeView(view);
});
isSet = false;
});
}
var index = Ti.UI.createWindow({
backgroundColor: "white",
id: "index"
});
var scView = Ti.UI.createScrollableView({
bottom: 150,
backgroundColor: "green",
id: "scView"
});
index.add(scView);
var bt = Ti.UI.createButton({
title: "click here",
bottom: 100,
width: 200,
height: 50,
color: "red",
borderWidth: 2,
id: "bt"
});
index.add(bt);
bt.addEventListener("click", doClick);
var myView = Ti.UI.createView({
backgroundColor: "pink",
id: "myView"
});
var animView = Ti.UI.createView({
id: "animView"
});
myView.add(animView);
animView.add( Ti.UI.createImageView({
image: "http://www.grandlifestyle.com/images/clickherered.gif",
}));
animView.addEventListener("click", imageClick);
index.open();
function doClick() {
if (!isSet) {
bt.hide();
scView.addView(myView);
isSet = true;
}
}
function imageClick() {
var matrix = Ti.UI.create2DMatrix();
matrix = matrix.scale(.9, .9);
animView.animate({
transform: matrix,
duration: 100,
autoreverse: true,
repeat: 1
}, function() {
bt.show();
_.each(scView.views, function(view) {
scView.removeView(view);
});
isSet = false;
});
}
var index = Ti.UI.createWindow({
backgroundColor: "white",
id: "index"
});
var scView = Ti.UI.createScrollableView({
bottom: 150,
backgroundColor: "green",
id: "scView"
});
index.add(scView);
var bt = Ti.UI.createButton({
title: "click here",
bottom: 100,
width: 200,
height: 50,
color: "red",
borderWidth: 2,
id: "bt"
});
index.add(bt);
bt.addEventListener("click", doClick);
var myView = Ti.UI.createView({
backgroundColor: "pink",
id: "myView"
});
var animView = Ti.UI.createView({
id: "animView"
});
myView.add(animView);
animView.add( Ti.UI.createImageView({
image: "http://www.grandlifestyle.com/images/clickherered.gif",
}));
animView.addEventListener("click", imageClick);
index.open();
Hi, I tested the issue you reported.I can't reproduce it. I recommend you upgrade SDK and Studio to the latest build and let us know if you get the error again. *Environment*
Thanks
Hi I was able to reproduce this with the latest SDK (5.1.1.GA), This happens when there is an object assigned to the {color:red}+*transform property in the animation object*+{color}. animate any view with transform and you will see that it will not be garbage collected. Please fix it.
Hi I was able to reproduce this with the latest SDK (5.1.1.GA), This happens when there is an object assigned to the {color:red}+*transform property in the animation object*+{color}. animate any view with transform and you will see that it will not be garbage collected. Please fix it.