From 33b5a2969a0de51f4241f170cafb386efa31cc99 Mon Sep 17 00:00:00 2001 From: Aki Date: Tue, 7 Jun 2016 22:10:29 +0200 Subject: Dest Destructors to make memory managment a little bit more efficient in long terms. --- ground.lua | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'ground.lua') diff --git a/ground.lua b/ground.lua index fa84506..6800944 100644 --- a/ground.lua +++ b/ground.lua @@ -28,6 +28,12 @@ function Ground:new (game, world, x, y, shape, sprite) return o end +-- Destructor of `Ground` +function Ground:delete () + -- body deletion is handled by world deletion + self.sprite = nil +end + -- Draw of `Ground` function Ground:draw (offset_x, offset_y, scale, debug) -- defaults -- cgit v1.1