From 5c880e06c3340f5e48a91376f6c86dcf347ffd89 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Alexis=20Laferri=C3=A8re?= Date: Sat, 21 May 2016 09:50:25 -0400 Subject: [PATCH] lib/realtime: free attributes of Clock at finalize_once MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Alexis Laferrière --- lib/realtime.nit | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/realtime.nit b/lib/realtime.nit index 6e312ef..5a9571d 100644 --- a/lib/realtime.nit +++ b/lib/realtime.nit @@ -121,6 +121,7 @@ end # Keeps track of real time class Clock + super FinalizableOnce # TODO use less mallocs @@ -181,4 +182,10 @@ class Clock dt.free return r end + + redef fun finalize_once + do + time_at_beginning.free + time_at_last_lapse.free + end end -- 1.7.9.5