Canvas window: allow gc to release resources
This commit is contained in:
parent
c53d5c12ba
commit
c759a3e57f
1 changed files with 6 additions and 0 deletions
|
@ -27,8 +27,13 @@ var Window = {
|
|||
del: func
|
||||
{
|
||||
me._node.remove();
|
||||
me._node = nil;
|
||||
|
||||
if( me["_canvas"] != nil )
|
||||
{
|
||||
me._canvas.del();
|
||||
me._canvas = nil;
|
||||
}
|
||||
},
|
||||
# Create the canvas to be used for this Window
|
||||
#
|
||||
|
@ -147,6 +152,7 @@ var Window = {
|
|||
me.set("decoration-border", "25 1 1");
|
||||
me.set("shadow-inset", int((1 - math.cos(45 * D2R)) * border_radius + 0.5));
|
||||
me.set("shadow-radius", 5);
|
||||
me.setBool("update", 1);
|
||||
|
||||
var canvas_deco = me.getCanvasDecoration();
|
||||
canvas_deco.addEventListener("mousedown", func me.raise());
|
||||
|
|
Loading…
Reference in a new issue