1
0
Fork 0

Canvas window: allow gc to release resources

This commit is contained in:
Thomas Geymayer 2013-06-08 13:07:16 +02:00
parent c53d5c12ba
commit c759a3e57f

View file

@ -27,8 +27,13 @@ var Window = {
del: func del: func
{ {
me._node.remove(); me._node.remove();
me._node = nil;
if( me["_canvas"] != nil ) if( me["_canvas"] != nil )
{
me._canvas.del(); me._canvas.del();
me._canvas = nil;
}
}, },
# Create the canvas to be used for this Window # Create the canvas to be used for this Window
# #
@ -147,6 +152,7 @@ var Window = {
me.set("decoration-border", "25 1 1"); me.set("decoration-border", "25 1 1");
me.set("shadow-inset", int((1 - math.cos(45 * D2R)) * border_radius + 0.5)); me.set("shadow-inset", int((1 - math.cos(45 * D2R)) * border_radius + 0.5));
me.set("shadow-radius", 5); me.set("shadow-radius", 5);
me.setBool("update", 1);
var canvas_deco = me.getCanvasDecoration(); var canvas_deco = me.getCanvasDecoration();
canvas_deco.addEventListener("mousedown", func me.raise()); canvas_deco.addEventListener("mousedown", func me.raise());