How I destroy stuff? Just doing a "nil" on them is enough?
What happen if I do this?
local group;
do
local someText = TextField.new(...);
group:AddChild(someText);
stage:AddChild(group);
end
my theories: one, is that someText is retained until you delete group, the other, is that as soon someText is out of scope it gets deleted, and disappears from group. So, what one is it?
Comments
http://www.giderosmobile.com/forum/discussion/comment/9441#Comment_9441
remove it from group...
OR
remove group from stage AND set group to nil.
Is that correct?
yes remove group from the stage
but setting group to nil depends on the scope, if it goes outside the scope (for example it is in function), then you don't have to nil it
And that example my intention is that group is local to the chunk. I don't think chunks ever go out of scope in gideros if they run on start or are called with "require", are they?
So...
What about this
https://github.com/gideros/gideros
https://www.youtube.com/c/JohnBlackburn1975