nitlanguage
/
nit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
d3f85dc
)
lib/realtime: free attributes of Clock at finalize_once
author
Alexis Laferrière
<alexis.laf@xymus.net>
Sat, 21 May 2016 13:50:25 +0000
(09:50 -0400)
committer
Alexis Laferrière
<alexis.laf@xymus.net>
Sat, 21 May 2016 15:03:27 +0000
(11:03 -0400)
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
lib/realtime.nit
patch
|
blob
|
history
diff --git
a/lib/realtime.nit
b/lib/realtime.nit
index
6e312ef
..
5a9571d
100644
(file)
--- 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