nitlanguage
/
nit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2885d44
)
lib/socket: `PollFD` is `FinalizableOnce`
author
Alexis Laferrière
<alexis.laf@xymus.net>
Fri, 26 Dec 2014 22:03:06 +0000
(17:03 -0500)
committer
Alexis Laferrière
<alexis.laf@xymus.net>
Sat, 27 Dec 2014 17:19:53 +0000
(12:19 -0500)
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
lib/socket/socket_c.nit
patch
|
blob
|
history
diff --git
a/lib/socket/socket_c.nit
b/lib/socket/socket_c.nit
index
793b1c5
..
ba76860
100644
(file)
--- a/
lib/socket/socket_c.nit
+++ b/
lib/socket/socket_c.nit
@@
-37,6
+37,7
@@
in "C" `{
# Wrapper for the data structure PollFD used for polling on a socket
class PollFD
+ super FinalizableOnce
# The PollFD object
private var poll_struct: NativeSocketPollFD
@@
-76,6
+77,10
@@
class PollFD
return response & mask;
`}
+ redef fun finalize_once
+ do
+ poll_struct.free
+ end
end
# Data structure used by the poll function