summaryrefslogtreecommitdiffhomepage
path: root/not/Layer.lua
diff options
context:
space:
mode:
authorAki <nthirtyone@gmail.com>2017-09-08 17:33:28 +0200
committerAki <nthirtyone@gmail.com>2017-09-08 17:33:28 +0200
commit4faecfbd6495c46c2d93ce314252feeb7879e568 (patch)
tree3ab7b92e97223f2276ad3a81d9c8f25fe18f79b7 /not/Layer.lua
parent5ef20afaf6a9aca1999faf8904594d94fcfaaa66 (diff)
downloadroflnauts-4faecfbd6495c46c2d93ce314252feeb7879e568.zip
roflnauts-4faecfbd6495c46c2d93ce314252feeb7879e568.tar.gz
roflnauts-4faecfbd6495c46c2d93ce314252feeb7879e568.tar.bz2
Some additional garbage collecting
Diffstat (limited to 'not/Layer.lua')
-rw-r--r--not/Layer.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/not/Layer.lua b/not/Layer.lua
index db16175..63c38ac 100644
--- a/not/Layer.lua
+++ b/not/Layer.lua
@@ -5,6 +5,10 @@ function Layer:new (width, height)
self.canvas = love.graphics.newCanvas(width, height)
end
+function Layer:delete ()
+ self.canvas = nil
+end
+
--- Sets this layer as current canvas for drawing with love.graphics functions.
-- @return old canvas used by love
function Layer:setAsCanvas ()