Finalizer behaviour

[email protected]$G$9!#(B

$B!!%U%!%$%J%i%$%6$N5sF0$,$o$+$i$J$$$N$G65$($F2<$5$$!#(B

loop{
obj = ‘’

p obj.object_id # (*1)

ObjectSpace.define_finalizer(obj){|id|
p id
}
‘b’
}

$B!!>e5-%9%/%j%W%H$K$F!"(B(*1)
$B$N2U=j$r%3%a%s%H%"%&%H$9$k$H%U%!%$%J%i%$%6$O(B
$B<B9T$5$l$^$9$,!"$3$N$h$&$K%3%a%s%H%"%&%H$7$F$$$k$H5/F0$7$^$;$s!#(B

$B!!$J$<$G$7$g$&$+!#(B

[email protected]$G$9!#(B

(2010/11/03 16:33), SASADA Koichi wrote:

$B!!>e5-%9%/%j%W%H$K$F!"(B(*1) $B$N2U=j$r%3%a%s%H%"%&%H$9$k$H%U%!%$%J%i%$%6$O(B
$B<B9T$5$l$^$9$,!"$3$N$h$&$K%3%a%s%H%"%&%H$7$F$$$k$H5/F0$7$^$;$s!#(B

$B!!$J$<$G$7$g$&$+!#(B

$B!!<+8J2r7h$7$^$7$?!#%U%!%$%J%i%$%6$H$7$F(B Proc
$B%*%V%8%’%/%H$r:[email protected]!&J]B8$7(B
$B$^$9$,!"$=$3$+$i(B obj
$B$X$N;2>H$,;D$C$F$$$k$N$G2rJ|$5$l$J$$$C$F$3$H$G$9(B
$B$M!#Nc$($P!"(Bobj $B$r(B $obj $B$H$9$k$HLdBjL5$/$J$j$^$9!#(B

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs